I have been working with ANTD since version 2.10. DatePicker had no problems with localization. When I switched to version 2.12.8 DataPicker began to display the months and days of the week in English, although the prompts in the TextBox are displayed correctly in any selected language. It seems that DatePicker does not interact correctly with the moment.js. How can I fix this? The application is built on the basis of Create-React-App.
...
import { LocaleProvider } from 'antd';
import ruRU from 'antd/lib/locale-provider/ru_RU';
...
<Provider store={store}>
<Router>
<LocaleProvider locale={ruRU}>
<App/>
</LocaleProvider>
</Router>
</Provider>
This one line worked for me:
import 'moment/locale/ru';
See 'note' in Antd docs: antd range picker docs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With