I would like to know how can we set the check-out date between the check-in date. Like if we select the month of June (when current month is February) and the 15th day. So i
Have a look at this demo. I've added some lines in the onSelect event like so:
onSelect: function(dateStr) {
var d1 = $(this).datepicker("getDate");
d1.setDate(d1.getDate() + 0); // change to + 1 if necessary
var d2 = $(this).datepicker("getDate");
d2.setDate(d2.getDate() + 30); // change to + 29 if necessary
$("#to").datepicker("setDate", null);
$("#to").datepicker("option", "minDate", d1);
$("#to").datepicker("option", "maxDate", d2);
datepicked();
}
According to my understanding of lodging business, the dates should be inclusive -- i.e. June/15/2012 + 30 nights should be June/14/2012. But I've followed the example you mentioned in the first few lines of question.