how to set local language,more detail example.
Hi, I find there is't a example show how to set local language, I'm a little confused.And I also find I can't use delete key to delete the date.Version 0.11.5
It seems that moment() locale overrides the DatePicker settings. I've got correct month names only after setting: moment.locale('ru'); before the DatePicker ... />
Also for correct weekday names I have to explicit set right names as props: DatePicker key={1} dateFormat="YYYY-MM-DD" locale="ru" weekdays={['Вс', 'Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб']} />
you should downloadzh-cn.js from moment.js and reuqire it , then set
moment.locale('zh-cn');
and set DatePicker locale
getDefaultProps: function getDefaultProps() {
return {
weekdays: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
locale: "zh-cn",
dateFormatCalendar: "MMMM YYYY",
moment: moment,
onChange: function onChange() {},
disabled: false,
onFocus: function onFocus() {}
};
},
in react-datepicker.js
Looks like the fix.
seems like doesn't work. any idea how to resolve this issue?