3

我正在使用smalot/bootstrap-datetimepicker

如何设置从09:0020:00或禁用其他小时的小时范围。

我发现trentrichardson/jQuery-Timepicker-Addon可以设置 hourmax 和 hourmin,但是在 bootstrap-datetimepicker 中我该怎么做呢?

4

1 回答 1

1

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];
});
于 2015-07-15T16:52:05.160 回答