jquery - Bootstrap date picker range selector -


i trying modify bootstrap checkin/checkout date example can't make work.

the code disables dates before , when checkin date selected checkout date open , default has select next date. working fine, want when checkout date open , suggest next day disable dates before next date.

is possible?

var nowtemp = new date(); var = new date(nowtemp.getfullyear(), nowtemp.getmonth(), nowtemp.getdate(), 0, 0, 0, 0);  var checkin = $('#dpd1').datepicker({     onrender: function(date) {         return date.valueof() < now.valueof() ? 'disabled' : '';     } }).on('changedate', function(ev) {     if (ev.date.valueof() > checkout.date.valueof()) {         var newdate = new date(ev.date)         newdate.setdate(newdate.getdate() + 1);         checkout.setvalue(newdate);     }     checkin.hide();     $('#dpd2')[0].focus(); }).data('datepicker'); var checkout = $('#dpd2').datepicker({     onrender: function(date) {         return date.valueof() <= checkin.date.valueof() ? 'disabled' : '';     } }).on('changedate', function(ev) {     checkout.hide(); }).data('datepicker') 

you can use mindate , maxdate option


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -