jquery-timepicker
jquery-timepicker copied to clipboard
Starttime Endtime datepair with disabledtimerange
Hello,
i have a working script for selecting start end end times with disabledtimeranges. My problem is that the user is allowed to set a start time before a disabledtimerange and a end time after the disabled timerange.
I want that if a user select a start time, the max endtime is the start of the first disabled time range.
I hope you understand my problem, thanks in advance!
Tom
My code:
I'm having trouble understanding. Maybe you can describe example times they could select?
Yes of course:
The start time is 8:00am The disabled time range is 10:00am-11:00am
The user cannot select An end time between 10 and 11 But hé can select end Times after 11:00
In This case the user must only be able to select An end time between 8 and 10
Verzonden vanaf mijn Galaxy
-------- Oorspronkelijk bericht -------- Van: Jon Thornton @.> Datum: 19-03-2021 05:06 (GMT+01:00) Aan: jonthornton/jquery-timepicker @.> Cc: Tom Waarsenburg @.>, Author @.> Onderwerp: Re: [jonthornton/jquery-timepicker] Starttime Endtime datepair with disabledtimerange (#752)
I'm having trouble understanding. Maybe you can describe example times they could select?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/jonthornton/jquery-timepicker/issues/752#issuecomment-802536147, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATJHOGCFV4VBCKCZL7PUUDDTELESXANCNFSM4ZMUHDSQ.
It sounds like you want the endtime to allow selecting within 2 hours of the start time? I'm not sure this is something the datepair plugin will do. You may need to code up a custom changeTime handler to achieve this behavior.