react-datepicker
react-datepicker copied to clipboard
default value for dateFormatCalendar is not suitable for japanese locale
Default value for dateFormatCalendar is 'LLLL yyyy' (ie June 2020), if used with japanese locale it produce the text '7月 2020' whereas expected text is '2020年 7月'. It's strange specially when uses dateFormat="P".
To Reproduce Steps to reproduce the behavior:
- set locale to 'ja'
- Use :
<DatePicker
onChange={(r: any) => ()}
dateFormat="P"
minDate={new Date()}
fixedHeight
/>
- calendar input shows '2020/07/16' which is localized
- open calendar, the top date is '7月 2020' which is not localized
Expected behavior top date should '2020年 7月.
Screenshots If applicable, add screenshots to help explain your problem.
** workaround ** use dateFormatCalendar="yyyy年 LLLL" for 'ja' locale only it shows:
however I expect react-datepicker to convert 'LLLL yyyy' default value to the right one in current locale.
Desktop (please complete the following information):
- Browser Chrome Version 83.0.4103.116 in Win10