Having trouble with a JavaScript function I wrote to validate a date selected from a calendar against the current date. The date format being displayed in the text box is "01-Oct-2010". Here's the function I created:
function CheckDate() {
var today = new Date();
var startDate = document.getElementById("<%=txtStartDate.ClientID %>").value;
var endDate = document.getElementById("<%=txtEndDate.ClientID %>").value;
if (Date.parse(endDate) >= today) {
alert("End Date should not be greater than Today");
}
return true;
}