Cab Grid Pro version 4.1.1 introduces further control over the date/time picker on the taxi booking form. A minimum lead time and a maximum booking date can be set along with the ability to disable booking on specific dates.
These criteria apply to in-built date/time pickers for pick-up and return fields only. They do not apply to custom date/time form fields.
Under the OPTIONS tab on the Cab Grid Pro page of the WordPress Admin there is a new item labelled, “Booking lead time:” From this select box a period can be selected in hours or days. This is the amount of time between now and the earliest possible booking time (lead time). So, if set to “4 hours” no booking can be requested sooner than 4 hours from the time of booking.
The date/time picker will simply not allow this. Even if an earlier date/time does get input, the booking will not submit since the field will fail validation.
Note: The return date field (if enabled) will automatically add 1 hour to the minimum time so, if the pickup lead time is set to 4 hours, the return date/time cannot be booked for less than 5 hours hence.
Farthest Possible Booking
Along side the lead time, there is another new field labelled, “Last booking date:” This field allows the period for the latest possible booking to be specified. This is measured in days and years. A booking cannot be made for after this period (measured from today).
So, if set to “1 year” the date/time picker will not allow dates beyond 1 year from now (point of booking). The return date/time picker adds 1 day to the pick-up date time picker.
Prevent Booking on Specific Dates
Note: Excluding dates will disable native mobile date picker: Native mobile date/time pickers do not currently have the ability to exclude (or disable) certain dates. Thus, if dates are excluded, the calendar-style date-time picker will be displayed instead of the native mobile date-time picker.
An “Exclude dates:” field is now also available under the Cab Grid Pro OPTIONS tab. The booking date/time picker will not allow specified dates to be selected for booking requests. This is a good means of preventing bookings being made on public holidays, during private time-off, or when there is limited availability.
In Cab Grid Pro version 5 or higher, this field provides a date-picker. When clicked, the picker will display. Click each date to be excluded. Selected dates will be highlighted on the picker. To remove a date, click it again in the picker.
In Cab Grid Pro version 4 or earlier, the exclude dates field accepts a comma-separated list of dates in the format yyyy-mm-dd (where y=year, m=month, d=day; including leading zeros).
To exclude December 25th and January 1st, for example, the following value would be entered in the Exclude Dates field: