i have to customize jquery-ui-timepicker from https://github.com/jonthornton/jquery-timepicker
The goal is to introduce a break into a specific time range:
my initial code here
jQuery(".my_time_field").timepicker({
"minTime": "10:00",
"maxTime": "22:00",
"disableTextInput": "true",
"disableTouchKeyboard": "true",
"scrollDefault": "now",
"step": "60",
"selectOnBlur": "true",
"timeFormat": "H:i"
});
this code produce a dropdown list like that:
10:00
11:00
...
21:00
22:00
but i have to display e.g.
10:00
11:00
12:00
13:00
14:00 <--- last hour of the first range
18:00 <--- first hour of the second range
19:00
...
22:00
I have no idea how to do that. At the moment I am trying to create an array with the needed hours and inject in the timepicker but I don't know if thats possible. If there's better solution, let me know.