js compare date without time code example
Example 1: javascript get date without time
function WithoutTime(dateTime) {
var date = new Date(dateTime.getTime());
date.setHours(0, 0, 0, 0);
return date;
}
Example 2: compare date and time in js
var isLarger = new Date("2-11-2012 13:40:00") > new Date("01-11-2012 10:40:00");