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

Control DatePicker date format independently of the locale #3640

Open
estoksam opened this issue Oct 3, 2024 · 0 comments
Open

Control DatePicker date format independently of the locale #3640

estoksam opened this issue Oct 3, 2024 · 0 comments

Comments

@estoksam
Copy link

estoksam commented Oct 3, 2024

Is your feature request related to a problem? Please describe.

Our problem is a niche problem, so we understand why this feature hasn't been implemented. Our application is in British English, following the standard Equinor language choice. However, we use the date format d.m.yyyy in the application, because a forum of UX designers landed on this as the best option while discussions are ongoing. So, for example, the date 1234-01-10 is "10.1.1234" in our app in general. The "en-UK" locale sets the format to dd/mm/yyyy ("10/01/1234"). While this is understandable for a Norwegian, it's not our choice.

We can specify the format of the day, month and year, but not select a separator.

Describe the solution you'd like

Ideally, we'd have a property named something like "dateLocale" that changes the format, but not the language, of the date to the selected one. So we would get dd.mm.yyyy if we select the locale "no", but if we were to use the full month's name in the format, we'd get "December", not "desember". The calendar and validation errors would still use the "locale" property's choice of language. I suppose it's also relevant to use the Norwegian start of week, so somebody choosing "en-US" for the language and "no" for the dates would still get Monday as the first day of the week.

Describe alternatives you've considered

We have looked for an alternative but have found none. If Equinor wants to use dd/mm/yyyy, everything is good and no change has to be made.

Additionally, we can select "no" as the locale, but then the placeholder text, calendar and validation errors would be shown in Norwegian, a language we have to assume our users don't understand. I have separately reported an issue about the min/max value validation errors not following the selected locale's language.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant