Tempus Dominus Date/Time Picker

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
aiden
User
Posts: 14

Tempus Dominus Date/Time Picker

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


aiden
User
Posts: 14

Post by aiden »

Fixed! Forgot to add the element ID.


aiden
User
Posts: 14

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


Post Reply