When opening the time dropdown, the time is displayed from 00:00 to 23:45, while in the calendar it's displayed from 8:00 to 20:00. How can I ensure that the time in the dropdown also ranges from 8:00 to 20:00?
I've placed this code in the extensions > Date/Time picker > Advanced section: { localization: { startOfTheWeek: '1', dayViewHeaderFormat: { month: "long", year: "numeric" } } }.
I've tried a few codes to specify the time myself in the startup_script, but it didn't work. Does anyone have an idea how to do this?
Here are the codes I've tried (none of them works):
1- $('#datetimepicker').datetimepicker({ format: 'HH:mm', enabledHours: Array.from({ length: 13 }, (_, i) => i + 8) // 8:00 to 20:00 });
2- $('#datetimepicker').datetimepicker({ locale: 'nl', format: 'LT', enabledHours: [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], stepping: 15 });