Change locale of RangePicker #8635
Comments
Hi, I am under the impression that the fix is not working with antd Maybe something specific to the Thanks for your dedication & great project, |
I have updated antd to |
Part of locale of DatePicker, MonthPicker, RangePicker, WeekPicker is read from value. So, please set the locale of moment correctly. |
Yes indeed I noticed it in the docs, but got confused with this bug + correctly loading the moment locales. No problem with Antd then. Thanks for your answer! |
https://codepen.io/benjycui/pen/KgPZrE?editors=001 |
Version
3.0.1
Environment
Linux Mint 17, Chrome 63.0.3239.108
Reproduction link
https://codepen.io/anon/pen/aEOrLZ?editors=1010
Steps to reproduce
Provide
locale
object as prop to <DatePicker.RangePicker>What is expected?
Locale to be changed and strings in header and footer of RangePicker to be translated to the language in locale object
What is actually happening?
The language is not changed and is still the default one (en)
After some experimenting I found the following thing:
If we open
antd/lib/date-picker/wrapPicker.js
and changeto
then the locale is changed as it should (and if not provided then we have the default one).
So it looks that always is applied the default locale without check for the user defined.
In the previous versions e.g. 2.13.x providing with locale object was enough.
This is my observation, am I missing something ?
The text was updated successfully, but these errors were encountered: