var dt_from = "2013/05/25";
var dt_to = "2013/05/25";
if(dt_from == dt_to)
{
alert("Both dates are Equal!");
}
else if(dt_from > dt_to)
{
alert("From date should not be greater than todate!");
}
else if(dt_from < dt_to)
{
alert("Okay!");
}
The above Code is working fine. But the following code is not working:
var dt_from = new Date("2013/05/25");
var dt_to = new Date("2013/05/25");
if(dt_from === dt_to)
{
alert("Both dates are Equal!");
}
else if(dt_from > dt_to)
{
alert("From date should not be greater than todate!");
}
else if(dt_from < dt_to)
{
alert("Okay!");
}
This if(dt_from === dt_to)
is not working with the above code. Any Idea?