Metro-UI-CSS
Metro-UI-CSS copied to clipboard
Date format in Calendarpicker not working
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

https://github.com/olton/datetime/blob/master/src/core/class.js#L236
Thank you, I will investigate this bug.