Skip to content

Instantly share code, notes, and snippets.

@stormbreakers
Created January 29, 2016 15:19
Show Gist options
  • Select an option

  • Save stormbreakers/5bec0b69142bf95991a3 to your computer and use it in GitHub Desktop.

Select an option

Save stormbreakers/5bec0b69142bf95991a3 to your computer and use it in GitHub Desktop.
check if start date is greater than end date
function checkTime() {
start = $("#startDate").val();
end = $("#endDate").val();
if((Date.parse(start) > Date.parse(end))) {
$("#startDate").focus();
alert('Incorrect Start time and End time');
return false;
}else{
return true;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment