37
rated 0 times
[
40]
[
3]
/ answers: 1 / hits: 44261
/ 11 Years ago, tue, june 18, 2013, 12:00:00
This is my code:
var $from = $("#fromDate").datepicker('getDate');
var $to = $("#toDate").datepicker('getDate');
if($from > $to)
alert("from date shouldn't greater than To date");
It is working if it is two dates in the same year. Otherwise, for example
fromDate='1/12/2012'(dd/mm/yyyy) toDate='18/6/2013'(dd/mm/yyyy), while you check the condition, it is not working. It throws an alert, which is given.
More From » jquery