React-datepicker: Can't set locale

Created on 29 Sep 2017  Â·  6Comments  Â·  Source: Hacker0x01/react-datepicker

Hello,

I cannot set the locale to "de" to remove the AM and PM format.
I tried this via the locale property and the moment global locale method.

wontfix

Most helpful comment

Did you import 'moment/locale/de'?
and tried with locale='de'

All 6 comments

Did you import 'moment/locale/de'?
and tried with locale='de'

I've got the same problem. I've imported moment/locale/de, but locale="de" has no effect …

You need to call moment.locale('<your_local>'); after importing locales.

Thanks for answer.

import 'moment/locale/pl';
...
locale="pl"

The docs could say that importing the locale is needed. Also it could be specified in this example (locale example)

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hoodsy picture hoodsy  Â·  3Comments

dhruvparmar372 picture dhruvparmar372  Â·  3Comments

kkras3 picture kkras3  Â·  3Comments

ahribori picture ahribori  Â·  3Comments

carmouche picture carmouche  Â·  3Comments