2

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

mckenzie
  • 121
  • 4

1 Answers1

1

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)

sebpiq
  • 7,540
  • 9
  • 52
  • 69