Skip to content

fix(DatePicker): date picker month label with "year first" locales#21174

Merged
heloiselui merged 7 commits into
carbon-design-system:mainfrom
fucadzi:fix/date-picker-month-label
Apr 20, 2026
Merged

fix(DatePicker): date picker month label with "year first" locales#21174
heloiselui merged 7 commits into
carbon-design-system:mainfrom
fucadzi:fix/date-picker-month-label

Conversation

@fucadzi

@fucadzi fucadzi commented Dec 13, 2025

Copy link
Copy Markdown
Contributor

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

  • fixed inserting month label node inside flatpickr-current-month node, 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:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@fucadzi fucadzi requested a review from a team as a code owner December 13, 2025 15:40
@github-actions

github-actions Bot commented Dec 13, 2025

Copy link
Copy Markdown
Contributor

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

@fucadzi fucadzi changed the title Fix/date picker month label fix(DatePicker): date picker month label Dec 13, 2025
@fucadzi fucadzi changed the title fix(DatePicker): date picker month label fix(DatePicker): date picker month label with "year first" locales Dec 13, 2025
@netlify

netlify Bot commented Dec 13, 2025

Copy link
Copy Markdown

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 58e371e
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69e62043b017fa00085607da
😎 Deploy Preview https://deploy-preview-21174--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Dec 13, 2025

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 9c13aca
🔍 Latest deploy log https://app.netlify.com/projects/carbon-elements/deploys/693d88d858497a00080ebbb9
😎 Deploy Preview https://deploy-preview-21174--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Dec 13, 2025

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 58e371e
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69e62043c67bdc00088a22d7
😎 Deploy Preview https://deploy-preview-21174--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fucadzi

fucadzi commented Jan 5, 2026

Copy link
Copy Markdown
Contributor Author

I have read the DCO document and I hereby sign the DCO.

@heloiselui heloiselui requested review from devadula-nandan and removed request for Gururajj77 January 28, 2026 09:55

@devadula-nandan devadula-nandan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@emyarod emyarod left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me! just need to resolve the merge conflict

@codecov

codecov Bot commented Mar 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.99%. Comparing base (efcbaa2) to head (58e371e).
⚠️ Report is 1 commits behind head on main.

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           
Flag Coverage Δ
main-packages 89.03% <ø> (ø)
web-components 97.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@devadula-nandan devadula-nandan added this pull request to the merge queue Mar 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Mar 11, 2026
@devadula-nandan devadula-nandan self-assigned this Mar 11, 2026
@devadula-nandan devadula-nandan added this pull request to the merge queue Mar 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Mar 11, 2026
Comment thread packages/react/src/components/DatePicker/DatePicker.tsx
@heloiselui heloiselui added this pull request to the merge queue Apr 20, 2026
Merged via the queue into carbon-design-system:main with commit 1a9ccca Apr 20, 2026
39 checks passed
@github-project-automation github-project-automation Bot moved this from 🚦 In Review to ✅ Done in Design System Apr 20, 2026
MarianaAa01 pushed a commit to MarianaAa01/carbon that referenced this pull request May 29, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Month label in date picker not updating when locale has month after year

5 participants