Form.Validator - validate-date bug in FF4/IE9 #1002

Open
tjeerdkramer opened this Issue Aug 3, 2011 · 2 comments

Comments

Projects
None yet
4 participants
@tjeerdkramer

tjeerdkramer commented Aug 3, 2011

The date validator doesn't work correctly in FF4 and IE9 (no others tested except Chrome, which works)

See:
http://jsfiddle.net/LgJsN/1809/

Entering 31/31/2009 results in a validated field, except that the value of the input field changes into "31/07/2011", which is obviously not the same as the (invalid) date input of "31/31/2009".

Also, when entering a valid date (dateFormat:'%d/%m/%Y') such as "31/02/1999" messes things up, as it changes into "02/07/2001"

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/359985-form-validator-validate-date-bug-in-ff4-ie9?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).
@arian

This comment has been minimized.

Show comment
Hide comment
@arian

arian Aug 3, 2011

Member

It's because Date.parse('31/31/2009') returns Date {Sun Jul 31 2011 00:00:00 GMT+0100 (BST)} in Firefox. Probably that should return an invalid date.

Member

arian commented Aug 3, 2011

It's because Date.parse('31/31/2009') returns Date {Sun Jul 31 2011 00:00:00 GMT+0100 (BST)} in Firefox. Probably that should return an invalid date.

@cenobitedk

This comment has been minimized.

Show comment
Hide comment
@cenobitedk

cenobitedk Mar 16, 2012

This is related to issue #1034.

This is related to issue #1034.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment