Hi, in original code the eyecode have example for check-in and checkout
http://www.eyecon.ro/bootstrap-datepicker/
Disabling dates in the past and dependent disabling.
this code not working whit this version of bootstrap-datepicker?
var nowTemp = new Date();
var now = 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');
any help? i need use this version 1.3 but is more compatible with mobile version, the version eyecon not working in mobile version and bootstrap 3 :/
Cheers
To view this discussion on the web visit https://groups.google.com/d/msgid/bootstrap-datepicker/7e398a32-ca4c-4999-a9df-8e64ba3b70f6%40googlegroups.com.--
You received this message because you are subscribed to a topic in the Google Groups "bootstrap-datepicker" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bootstrap-datepicker/VtVekquIVXI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bootstrap-datepi...@googlegroups.com.
To post to this group, send email to bootstrap-...@googlegroups.com.