开发者

jquery two different date validation

var cin = $开发者_开发百科("#datepicker").val(); var cout = $("#datepicker2").val(); dateformat is : dateFormat: 'DD, d MM, yy'

how do i use jquery to check cin(checkin) date not past cout(checkout) date? which means, cout date cannot earlier then cin date


I don't know what your datepicker is, but if it is a JQuery-datepicker, then better get the date with .datepicker("getDate"). Then, you should have JS Date objects, that you can compare like normal numbers (see http://www.w3schools.com/js/js_obj_date.asp)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜