-
Notifications
You must be signed in to change notification settings - Fork 66
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(datepicker): Enable custom date-formats #3415
Conversation
106b99f
to
0684520
Compare
fix(datepicker): Handle external null-values
0684520
to
509e165
Compare
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.
LGTM!
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.
Not sure how the formatting of the input works from a UX perspective, but other than that I like that it is based on Intl.DateTimeFormat 👍
Added a small comment about the useEffect
that we could describe in code.
@torleifhalseth there is a short video in the issue here -> #3405 (comment) Agree on adding a note on the effect 👍 |
add comment on why we call useEffect
* feat(datepicker): Enable custom date-formats * fix(datepicker): Handle external null-values
This pr fixes a bug where innerValue is used if value is null. innerValue should only be used if defaultValue is set (most likely need better logic here). Resolves #3414
Also implements a way to format the segments when they are not focused, to avoid 04/06/2024 being confusing based on user language/locale setup. This is not the solution requested, but the one that both allows for accessibility to be maintained, and allows for custom formatting. Resolves #3405