mikecoj / MCDatepicker

A vanilla JavaScript Datepicker
https://mcdatepicker.netlify.app/
MIT License
93 stars 18 forks source link

Custom names for weekdays and months does not work for some languages #59

Open milesich opened 3 years ago

milesich commented 3 years ago

customWeekDays and customMonths properties would throw an error when I try to use names in Korean (ko-KR) or Japanese (jp-JP).

ko-KR
['일요일', '월요일', '화요일', '수요일', '목요일', '금요일', '토요일']
['1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월']
jp-JP
['日曜日', '月曜日', '火曜日', '水曜日', '木曜日', '金曜日', '土曜日']
['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']

Also please provide a new property where I could set custom names for those short week names. The current solution is not correct for Chinese (zh-CN) and probably others.

mikecoj commented 3 years ago

Hi there,

thanks for opening this issue.

Will add a new option to fix all these!