Simple function Date.parse()
not working well in Internet Explorer 8.
I am using Date.parse()
to validate date in format "MM/DD/YYYY"
.
_.isNaN(Date.parse("99/99/9999"))
returntrue
- date is invalid_.isNaN(Date.parse("01/01/1990"))
returnfalse
- date is valid
But now I tried my JavaScript in IE 8 and I'm confused.
"88/88/8888"
- for this date all working well - date is invalid."13/35/2012"
- invalid date butDate.parse("13/35/2012")
parse this date in IE only and don't returnNaN
.
Any ideas?