-
-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
Datepicker is not using custom dateFormat from locale #42119
Comments
I don't think this is the same issue, as there the problem lied in translating written days of the week. I had a similar issue and fixed it by importing the language files. |
I'm sorry I was careless |
@richard-schiemenz I'm sorry, but the official documentation doesn't seem to indicate that the |
@BoyYangzai the official example for the DatePicker locale has it listed. locale example Further it's the only date with the same format that is displayed. |
@richard-schiemenz |
@BoyYangzai Ok, thank you. |
I think it is indeed a bug. |
Co-authored @any1024 |
Hey guys, looking at it to see it if I can contribute with a pr! |
@richard-schiemenz The writing should be as follows. |
@Rafael-Martins You are at antd 4. * Have you used this function in the version? |
|
Oh cool, I was fixing my local environment. I will try to fix it today! |
I opened a pr with a solution, we can discuss about it in there! |
Duplicate of #23902 |
Reproduction link
Steps to reproduce
Wrap DatePicker in ConfigProvider with locale and dateFormat for DatePicker set.
Select a date in the DatePicker.
What is expected?
The date is formatted with the format specified in the locale.
What is actually happening?
The date is formatted with the default format.
I need to set the format of the date displayed based on the locale as I have multiple locales. I have tested modifying other values in the locale object and it worked as expected. Only modifying the dateFormat seems not to be working.
Other issues show a solution by setting the format in the DatePicker to "L" but this is a fix using moment and I want to stay with the now default dayjs.
The text was updated successfully, but these errors were encountered: