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
feat: add localized formatting using date-fns #2160
base: 13.5.0
Are you sure you want to change the base?
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update from master. Lets try to get this in a patch but lets fix conflicts first.
I'll update from master, but I think this should be part of at least a minor version since placeholder text will need to be updated in applications that are using the component. |
Can you show what teams need to do and what will break for teams? |
This is actually nontrivial for teams, since the placeholder needs to switch from being unconditionally |
179135a
to
7454f0d
Compare
So for now: lets not make this automatic. If they want to get this new functionality, have them pass an argument like |
7454f0d
to
8d25acd
Compare
$ const { | ||
a11yOpenPopoverText = "open calendar", | ||
range, | ||
inputPlaceholderText = "YYYY-MM-DD", | ||
inputPlaceholderText = "MM/DD/YYYY", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably keep the original default, otherwise it will be breaking if they don't pass in localizeFormat
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving for now if that placeholder issue is fixed.
8d25acd
to
886fc9d
Compare
Need to update snapshots in tests. @LuLaValva |
Description
Use
date-fns
to localize date format in date textbox instead of using ISO.Note
date-fns
maintains their own list of locales that likely doesn't exactly match the browser. This is likely something we will need to maintain ourselves, or provide/find a mappingScreenshots