Page 1 of 1

Tempus Dominus Date/Time Picker

Posted: Tue Apr 23, 2024 10:04 pm
by aiden

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 });


Re: Tempus Dominus Date/Time Picker

Posted: Wed Apr 24, 2024 4:29 pm
by aiden

Fixed! Forgot to add the element ID.


Re: Tempus Dominus Date/Time Picker

Posted: Mon Apr 29, 2024 4:10 pm
by aiden

We used this code:

//Tijd aanpassen 
$('.form-control.ui-timepicker-input').timepicker({
'minTime': '8:00',
'maxTime': '7:45',
'timeFormat': 'H:i',
'step': 15
});