$("#EndDate").change(function () {
var startDate = document.getElementById("StartDate").value;
var endDate = document.getElementById("EndDate").value;
if ((Date.parse(startDate) >= Date.parse(endDate))) {
alert("End date should be greater than Start date");
document.getElementById("EndDate").value = "";
}
});
you are checking like
start date <= end date
this condition is true in your example like start date
12/02/2014
and end date
13/03/2014
, so its showing wrong message.
if you need to check that, start date is not greater than end date, then you need to check like this..
start date>= end date