Describe the bug
customParseFormat plugin produces different date when an invalid date is passed.
https://runkit.com/embed/k5j55xssyhfq
Expected behavior
It should produce Invalid date
Information
I get something similar with a different format:
Same with: https://runkit.com/embed/qck0gd6k0opj
Actually you can put in garbage date and it makes it valid at leas that function does
I fixed it temporarily by using a compare function before I go on in code, like:
(date, format) => dayjs(date, format).format(format) === date
This way I can meanwhile evaluate if the date is valid.
But I definitely think its a bug.
Most helpful comment
I fixed it temporarily by using a compare function before I go on in code, like:
This way I can meanwhile evaluate if the date is valid.
But I definitely think its a bug.