Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:(module:datepicker): wrong day headers when FirstDayOfWeek!=Sunday #2571

Merged

Conversation

Alexbits
Copy link
Contributor

@Alexbits Alexbits commented Jul 16, 2022

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

Fixes the day headers order issue from #1551

The fix is not ideal maybe. Because if the user changes the order in DateLocale.ShortWeekDays this will still cause wrong day headers. So the order of days in DateLocale.ShortWeekDays should be preserved.

Anyways, it's better than what we have now.

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link

github-actions bot commented Jul 16, 2022

@codecov
Copy link

codecov bot commented Jul 16, 2022

Codecov Report

Merging #2571 (16e07d9) into feature (4818d8b) will increase coverage by 3.25%.
The diff coverage is 75.00%.

@@             Coverage Diff             @@
##           feature    #2571      +/-   ##
===========================================
+ Coverage    27.68%   30.94%   +3.25%     
===========================================
  Files          503      541      +38     
  Lines        34064    26274    -7790     
  Branches         0      260     +260     
===========================================
- Hits          9430     8130    -1300     
+ Misses       24634    18104    -6530     
- Partials         0       40      +40     
Impacted Files Coverage Δ
...date-picker/internal/DatePickerDatetimePanel.razor 70.78% <ø> (+70.78%) ⬆️
...nts/date-picker/internal/DatePickerDatePanel.razor 68.29% <75.00%> (+12.73%) ⬆️
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) ⬇️
...ponents/core/Component/Overlay/type/TriggerType.cs 81.25% <0.00%> (-2.97%) ⬇️
...onents/date-picker/internal/DatePickerHeader.razor 43.90% <0.00%> (-2.48%) ⬇️
components/menu/SubMenu.razor 63.93% <0.00%> (-2.30%) ⬇️
components/timeline/Timeline.razor.cs 63.21% <0.00%> (-2.24%) ⬇️
... and 446 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4818d8b...16e07d9. Read the comment docs.

@ElderJames
Copy link
Member

The fix is not ideal maybe. Because if the user changes the order in DateLocale.ShortWeekDays this will still cause wrong day headers. So the order of days in DateLocale.ShortWeekDays should be preserved.

@Alexbits I think we need to add some notes to the document.

@Alexbits
Copy link
Contributor Author

The fix is not ideal maybe. Because if the user changes the order in DateLocale.ShortWeekDays this will still cause wrong day headers. So the order of days in DateLocale.ShortWeekDays should be preserved.

@Alexbits I think we need to add some notes to the document.

I'm not sure where @ElderJames?

@ElderJames
Copy link
Member

Here site\AntDesign.Docs\Demos\Components\DatePicker\doc\index.en-US.md

@ElderJames
Copy link
Member

@Alexbits Please solve the conflicts

@ElderJames ElderJames merged commit 894439a into ant-design-blazor:feature Jul 26, 2022
ElderJames added a commit that referenced this pull request Sep 6, 2022
…ay (#2571)

* fix:(module:datepicker): wrong day headers when FirstDayOfWeek!=Sunday

* add:(module:datepicker): localization note

* fix the order of shortWeekDays in zh-CN

Co-authored-by: James Yeung <shunjiey@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants