mdehoog / Semantic-UI-Calendar

Calendar module for Semantic UI
MIT License
804 stars 126 forks source link

Localized Calendar Initial Date Always First of Month #138

Open EnglishLanguageInstitute opened 5 years ago

EnglishLanguageInstitute commented 5 years ago

We have a very basic configuration on the Semantic UI calendar, however we are in the process of translating our web application into Korean. For some reason, any initial date I set while localized for Korean automatically sets the calendar to the first day of the initial date month. So, for example, I set the initial date(via the value of the calendar text field HTML) to "11-09-2020" and when the page renders the date displayed in the calendar text field is "9월 1, 2020". No matter what I set the initial date to, it always renders as the first day of the month. I have also tried setting the initial date via the 'initialDate' option in the calendar. The results are the same.

What's also strange is that if I put a console log to show the value of the "display" variable(line 183 in calendar.js) and reload the page, the console shows 6 entries for the display variable value. The first 3 are accurate to what I entered as the initial date(2020-11-09). Then there are 3 more console entries with the first day of the month(2020-09-01). Screen Shot 2019-06-12 at 1 33 46 PM

Everything works fine in the default locale of English.

Any help would be greatly appreciated.