fix(DatePicker): date picker month label with "year first" locales#21174
Conversation
|
All contributors have signed the DCO. |
✅ Deploy Preview for v11-carbon-web-components ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for v11-carbon-react ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
I have read the DCO document and I hereby sign the DCO. |
There was a problem hiding this comment.
LGTM, tested and works as expected.
Could u update the contributor file conflict?
found something unrelated to the issue. the locale global control from the storybook toolbar updates to 'ja-JP'
which seems not working as locale prop accepts 'ja' in datepicker
I'm going to update the story to const locale = useDocumentLang().split('-')[0]; in a separate pr #21401
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21174 +/- ##
=======================================
Coverage 94.99% 94.99%
=======================================
Files 538 538
Lines 44970 44970
Branches 6483 6517 +34
=======================================
Hits 42721 42721
Misses 2120 2120
Partials 129 129
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
1a9ccca
…arbon-design-system#21174) * fix: localised month name insertion * docs: contributors list * chore: merge conflict * test(datepicker): cover locale month-label regression --------- Co-authored-by: Nandan Devadula <47176249+devadula-nandan@users.noreply.github.com> Co-authored-by: “heloiselui” <helolui27@gmail.com> Co-authored-by: Heloise Lui <71858203+heloiselui@users.noreply.github.com>
Closes #21173
Fixes month label update on month change in Date Picker with locales that have years before months (e.g., "lv", "lt").
Changelog
Changed
flatpickr-current-monthnode, not after it.Testing / Reviewing
Set Date Picker locale to "lv" and navigate between months, check if month name changes.
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
Updated documentation and storybook examplesWrote passing tests that cover this changeAddressed any impact on accessibility (a11y)Tested for cross-browser consistencyMore details can be found in the pull request guide