I am having a difficult time checking if one date is less than or equal to another.
Here is my code,
var bftStartDt = input1[0]; //This is a string with value "01-Jul-2007"
var bftEndDt = input1[4]; //This is a string with value "01-Jul-1942"
var strtDt = new Date(bftStartDt);
var endDt = new Date(bftEndDt);
var flag = 0; // false
if (endDt <= strtDt){
flag = 1; // true
}
It never enters the if statement when it should ? What am I missing here.
Thanks