I am comparing two date, one is the current date and the other is selected from the input date type. I want if the selected date is less than the current date return true, but it does not returning true;
function check_start_date(obj){
var value= obj.value;
var curr_date= new Date();
var selected_date= new Date(value);
curr_date= trim_time(curr_date);
if(selected_date < curr_date){
alert("less");
return true;
}
else{
return false;
}
}