bootstrap-datetimepicker
bootstrap-datetimepicker copied to clipboard
When setting "setMinutesDisabled" to null, hours are set to current hour
I want to set disabled minutes for specific hours. For example, when I click on 15h, minutes 1-30 should be disabled. And when I click on 10h, minutes 45-59 should be disabled.
So in the "changeHour" event, I check which hour is clicked on and then set the disabled minutes with "setMinutesDisabled". This works. Now when I switch to another hour, I reset the "setMinutesDisabled" by doing this:
$('#datetimepicker').datetimepicker('setMinutesDisabled', null);
After doing that, the date displayed is the current date. So if I click on hour "20", I set minutesDisabled to null, it shows me the minute selector window and the date I see is the current hour, not 20h.