I want to know whether the given string is datetime, so i used the Date.parse() method as below
var dateType=!isNaN(Date.parse("2/3/2012")) // return true;
but for the string "2000" i am getting dateType as true
var dateType=!isNaN(Date.parse("2000")) // return true;
i want to return true when the format like "mm/dd/yyyy" is used in string not for "2000", is there any method to to like this.
Thanks in advance