var d1_str = "10-02-2010";
var d2_str = "11-01-2010";
var d1=0;
var d2=0;
d1 = new Date(d1_str.split('-')[2],d1_str.split('-')[1],d1_str.split('-')[0]);
d2 = new Date(d2_str.split('-')[2],d2_str.split('-')[1],d2_str.split('-')[0]);
if (d1.getTime()>d2.getTime()) {
alert("End Date should be greater than the Start date.");
return false;
}
else
{
return true;
}
Showing posts with label Compare two Date. Show all posts
Showing posts with label Compare two Date. Show all posts
Compare two Date
Posted by
Yugant Khokhar
on Friday, May 14, 2010
Labels:
Compare two Date
/
Comments: (0)