Restrict Date Picker for 24hours in Advance

Hi,

We have a client. To be able to prevent last-minute bookings in the date picker for reservations. So, for example, a person can not book for tonight’s dates for instance. So we want to restrict individuals from booking items last minute. We need to limit the date picker to not be able to select a date within 24hours of the date chosen. So today’s date will be greyed out as such and not an option to select. Is this even possible and what is code?

Lisa

Please see example 9 here:

With that you can prevent past dates or ensure that the date is one day in the future, two days, etc. This line prevents past dates:

optionsObj.minDate = 0;

If you wanted to ensure that today cannot be selected either, change it to this:

optionsObj.minDate = 1;

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.