Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Cant define locale #148

Open
PawelGIX opened this issue May 8, 2018 · 1 comment
Open

Cant define locale #148

PawelGIX opened this issue May 8, 2018 · 1 comment

Comments

@PawelGIX
Copy link

PawelGIX commented May 8, 2018

This not work:

import * as moment from 'moment';
import 'moment/locale/pl';
import { DatePicker, DatePickerInput } from 'rc-datepicker';

Then when i render this component:

				<DatePicker
				locale='pl' 
				// onChange={this.onChange} 
				/>

I get warning in console:
Setting "pl" as locale failed. Did you import it correctly?

How import this locale?

@DaviBFarias
Copy link

Thank you so much!

I am using DatePickerInput and my locale was not working, but taking a look in you code I saw that I missed to put import to locale, after that it's working for me!! Thanks

import 'moment/locale/pt-br';

...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants