I have a two textboxes which I'll get the date to compare in the format of yy-mm-dd.
// Get the value from textbox
var date1 = $("#f_date").val(); // 2015-01-01
var date2 = $("#t_date").val(); // 2015-03-01
if(date1 < date2) {
alert("From date is lesser than To Date");
}
else {
alert("From date is greater than To Date");
}
How can I do that? Please help. Thanks