vue-tailwind-picker icon indicating copy to clipboard operation
vue-tailwind-picker copied to clipboard

Faulty date format

Open mrneatly opened this issue 5 years ago • 2 comments

If I specify date format like YYYY.MM.DD, the datepicker works as expected, but if I switch placeholders and use format DD.MM.YYYY, component crashes with throwing next message in console: RangeError: Invalid array length.

After an additional investigation I discovered that the same message pops up if format starts with anything but year.

mrneatly avatar Nov 20 '20 10:11 mrneatly

If I specify date format like YYYY.MM.DD, the datepicker works as expected, but if I switch placeholders and use format DD.MM.YYYY, component crashes with throwing next message in console: RangeError: Invalid array length.

After an additional investigation I discovered that the same message pops up if format starts with anything but year.

Did you use the FormatDate prop? by default it is set to false and has value of YYYY-MM-DD if you insists using DD.MM.YYYY then make sure to specify this in the props.

muarachmann avatar Feb 25 '21 10:02 muarachmann

Sorry, it's been a while since I put this solution into use last time. Can't say for sure, but I can confirm I did it according to the docs.

mrneatly avatar Feb 25 '21 12:02 mrneatly