Metro-UI-CSS icon indicating copy to clipboard operation
Metro-UI-CSS copied to clipboard

Date format in Calendarpicker not working

Open bogozaur opened this issue 3 years ago • 2 comments
trafficstars

Describe the bug In the latest build, when you change the output date format from the default YYYY-mm-dd to anything else, the result is not correctly formatted.

To Reproduce Create a input with data-role="calendarpicker", set data-format="%d %b %Y" or data-format="%d %B %Y" . Now when you pick a date from the calendar, the result is %3 %b %undefined or %2 %B %undefined. The same problem can be seen in the example here: https://metroui.org.ua/calendarpicker.html

Expected behavior The date should be formatted correctly using the data-format format.

Screenshots image image

bogozaur avatar Oct 28 '22 11:10 bogozaur

https://github.com/olton/datetime/blob/master/src/core/class.js#L236

olton avatar Oct 28 '22 11:10 olton

Thank you, I will investigate this bug.

olton avatar Oct 28 '22 12:10 olton