New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dateISO bug: invalid month and date will pass the check #276
Comments
Will something like the following fix the issue.
|
I tried your fix and found an error in Chrome and Firefox (but it works in IE). Inputs like 1980-08-01 or 1980-11-09 does not pass the validation. The reason is that javascript returns zero for 08 and 09 when using parseInt. To fix this, add a second parameter to parseInt: var month = parseInt(split[1], 10) - 1; |
thanks for the fix. regards, On Thursday 29 March 2012 01:42 AM, hallberg wrote:
|
View my post where I added some more validations and solves some of the issues. |
The dateISO method does only structure checks. This will get fixed with #581. |
Until then, using @vikaskanani's method override is certainly a good idea. |
For example, "2011-13-32" will pass the input validation. However, 13 is not a valid month, and 32 is not a valid date.
The text was updated successfully, but these errors were encountered: