Note: Unless custom settings are defined (see below), the date and time format used for the CabGrid Pro booking form date/time input field is set by WordPress under Settings > General > Date Format and Time Format.
The CabGrid booking form requires customers enter a date and time for their journey start and a return date and time if necessary. This is enabled through a date-time picker which is displayed when the custom clicks the pick-up date or return date fields.
From CabGrid Pro version 5.0, the format of this date can be manipulated by editing the _settings.php file or using the Defaults Add-on plugin:
$cabGridDatePickerFormat="D, J M Y - H:i";
Prior to version 5, the date format can be edited at the top of the cab-grid-pro.js file:
var cabGridDatePickerFormat="D, J M Y - H:i";
Likewise, the time format can also be switched between 12 and 24-hour formats in either the _settings.php file (or Defaults Add-on) in v5+, or the cab-grid-pro.js file in v4.
CabGrid Pro v5+ (_settings.php)
$cabGridDatePicker24HrTime="y"; //("Y" or "n")
CabGrid Pro v4 (cab-grid-pro.js)
var cabGridDatePicker24HrTime=true; //(true or false)
The following tables give details of the token (character) substitutions that can be used to display the date and time to the customer.
Date Formatting Tokens
|d||Day of the month, 2 digits with leading zeros||01 to 31|
|D||A textual representation of a day||Mon through Sun|
|l (lowercase ‘L’)||A full textual representation of the day of the week||Sunday through Saturday|
|j||Day of the month without leading zeros||1 to 31|
|J||Day of the month without leading zeros and ordinal suffix||1st, 2nd, to 31st|
|w||Numeric representation of the day of the week||0 (for Sunday) through 6 (for Saturday)|
|F||A full textual representation of a month||January through December|
|m||Numeric representation of a month, with leading zero||01 through 12|
|n||Numeric representation of a month, without leading zeros||1 through 12|
|M||A short textual representation of a month||Jan through Dec|
|U||The number of seconds since the Unix Epoch||1413704993|
|y||A two digit representation of a year||99 or 03|
|Y||A full numeric representation of a year, 4 digits||1999 or 2003|
|Z||ISO Date format||2017-03-04T01:23:43.000Z|
Time Formatting Tokens
|H||Hours (24 hours)||00 to 23|
|h||Hours||1 to 12|
|i||Minutes||00 to 59|
|S||Seconds, 2 digits||00 to 59|
|s||Seconds||0, 1 to 59|
|K||AM/PM||AM or PM|
Escaping Formatting Tokens
If token characters are required within the date they must be escaped. Prefixing characters with two backslashes: \\ means the character will not bee interpreted/converted to a date part.
"Y-m-d \\m\\i\\d"Displays: 2017-01-22 mid}