I want to ask users for a date range using bootstrap datetimepicker. There is a field for the start date and another one for the end date, and they\'re initialized to the da
Based on the Linked Pickers example in the Bootstrap datetimepicker documentation, this should work.
Start:
.on('dp.change', function (selected) {
end.data("DateTimePicker").minDate(selected.date);
});
End:
.on('dp.change', function (selected) {
start.data("DateTimePicker").maxDate(selected.date);
});
Note:
On older versions of Bootstrap datetimepicker (less than v4), use .setMinDate
and .setMaxDate