Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Usage of date.js causes errors #174

Open
saslanis opened this issue May 6, 2019 · 0 comments
Open

Usage of date.js causes errors #174

saslanis opened this issue May 6, 2019 · 0 comments

Comments

@saslanis
Copy link

saslanis commented May 6, 2019

If you use the date.js library export does not work because date.js parse method returns null while Date.parse returns NaN on wrong dates.

So just change line 345
from

return !/.*%/.test(v) && !isNaN(Date.parse(v));

to

return !/.*%/.test(v) && !(Date.parse(v) == null);

thanks for the tool

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant