Simple example code for JS comparing two time sizes
if (new Date((/\-/g, '\/')) > new Date((/\-/g, '\/'))) { //The start time is greater than the end time alert("The time selection is incorrect! The start date must be less than or equal to the end period!"); return false; }