I'm using smalot/bootstrap-datetimepicker
How can I set the range of the hour from 09:00 to 20:00 or disable the other hour.
I found the trentrichardson/jQuery-Timepicker-Addon can set the hourmax and hourmin, but how can i do in the bootstrap-datetimepicker?
As of now, this is not possible using smalot's datetimepicker.
However, this is possible with eonasdan's (closely related) datetimepicker. With eonasdan's plugin, you would use the parameter en/disabledHours:
$("#myPicker").datetimepicker({
disabledHours: [0, 1, 2, 3, 4, 5, 6, 7, 8, 21, 22, 23, 24];
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With