-
Notifications
You must be signed in to change notification settings - Fork 86
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
Date Range locale override does not change format #6582
Comments
@harpalsingh tagging you as I suspect we'll need someone in content/translations/UX to make a decision on this (and I only know you 😉). There's basically quite a bit of conjecture about what formats to use, the official format for Canadian locales is ISO but that's only used by the government etc. When we looked online at the time we saw that a lot of people said they input dates in the formats we've gone with (they were also what the legacy component used) but also looking online just now I see some sites suggesting I'm happy to be involved in any discussions if needed 👍 |
For triage, we are currently overriding the date format string internally to be const outputFormat = ["fr-CA", "en-ZA", "ar-EG"].includes(code)
? "dd/MM/yyyy"
: format; |
@nicktitchmarsh @tomdavies73 is this something we can discuss as part of the ongoing localisation changes? |
Description
I am using the date range locale override to change the region to
"fr-CA"
and the dateFnsLocale to"frCA"
. It does not change the date format toyyyy/mm/dd
which would be the expected behaviour.Reproduction
https://carbon.sage.com/?path=/docs/date-range--default-story
Steps to reproduce
No response
JIRA ticket numbers (Sage only)
No response
Suggested solution
the
outputFormat
needs to be modified.Carbon version
125.6.0
Design tokens version
4.34.0
Relevant browsers
Chrome
Relevant OSs
Windows
Additional context
No response
Confidentiality
The text was updated successfully, but these errors were encountered: