olton / Metro-UI-CSS

Impressive component library for expressive web development! Build responsive projects on the web with the first front-end component library in Metro Style. And now there are even more opportunities every day!
http://metroui.org.ua/
MIT License
7k stars 1.97k forks source link

Date in calendar picker not rendering correctly on chrome. #1127

Closed maartinez closed 6 years ago

maartinez commented 6 years ago

Hi, I have this input:

<input id="date-from" type="text" data-role="calendarpicker" data-clear-button="true" data-locale="pl-PL" data-format="%d-%m-%Y" data-value="01-03-2018" value="01-03-2018">

When page is opened in Firefox date looks ok: 01-03-2018 When page is opened in Vivaldi or Chromium month and date are changed: 03-01-2018 Metro UI ver 4.2.10.686

olton commented 6 years ago

http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.15

olton commented 6 years ago

Read about dates in https://metroui.org.ua/calendar.html

maartinez commented 6 years ago

OK, so I found out that value must come in this format: 2018/03/01, not with "-". Data-format is changing than to 01-03-2018 and now it is rendered correctly everywhere. Sorry for that.