Remove part of the time interval Kendo Timepicker

Asked

Viewed 89 times

2

When using TimePicker of KendoUI to define a selection of service hours, the minimum period (8:00) and maximum period (18:00) was defined, but it will be necessary to remove the interval from 12:00 to 13:30 from this list.

How to accomplish this action?

1 answer

4


To do this you must use Configuration Dates. http://docs.telerik.com/kendo-ui/api/javascript/ui/timepicker#Configuration-Dates

See the example below. Note: Do not worry about the date. Only with the hours.

$("#timepicker").kendoTimePicker({
dates: [
    new Date(2000, 10, 10, 10, 0, 0),
    new Date(2000, 10, 10, 10, 30, 0),
    new Date(2000, 10, 10, 11, 0, 0),

    new Date(2000, 10, 10, 15, 0, 0),
    new Date(2000, 10, 10, 15, 30, 0),
    new Date(2000, 10, 10, 16, 0, 0)
] //vai mostra 10:00 AM até 11:00 AM e 3:00 PM até 4:00 PM

});

Browser other questions tagged

You are not signed in. Login or sign up in order to post.