JTSageDateBox A multi-mode date and time picker
DateBox can output in just about any known format. If you choose something really esoteric, be sure to check out linkedInput to ease sending your data to the backend.
Reminder about Overrides
When using the override system, note the use of camel case - i.e.
- dateFormat -> overrideDateFormat
<input type="text" data-role="datebox" data-options='{ "mode": "calbox", "overrideDateFormat": "%A, %B %-d, %Y" }'>
The date format follows the POSIX standards. There are two non-standard extensions, and 5 extensions for use with duration modes. By default, all numbers are zero-padded. (see modifiers section)
Standard Operators
- %% : A Literal '%'
- %a : Abbreviated Name of Day
- %A : Full Name of Day
- %b : Abbreviated Name of Month
- %B : Full Name of Month
- %C : Century (First 2 digits of a modern year)
- %d : Day of Month
- %E : Year of the Buddhist Era (Nominally Year + 543). Note, this may be wrong pre-1940CE
- %G : The ISO 8601 week-based year with century as a decimal number. The 4-digit year corresponding to the ISO week number (see %V). This has the same format and value as %Y, except that if the ISO week number belongs to the previous or next year, that year is used instead.
- %g : Like %G, but without century, that is, with a 2-digit year (00-99).
- %H : 24-Hour, Hour of day (01..23)
- %I : 12-Hour, Hour of day (01..12)
- %j : The day of the year as a decimal number (range 001 to 366).
- %k : 24-Hour, Hour of day (01..23) (Alias of %H)
- %l : 12-Hour, Hour of day (01..12) (Alias of %I)
- %m : Month of year (01..12)
- %M : Minute of the hour (00..59)
- %p : Meridian Letters (AM/PM) in uppercase
- %P : Meridian Letters (AM/PM) in lowercase
- %s : The number of seconds since the Epoch, 1970-01-01 00:00:00, in the local timezone
- %S : Seconds (00..59)
- %u : The numeric day of the week (1-7), 1 = Sunday
- %U : The week number of the current year as a decimal number, range 00 to 53, starting with the first Sunday as the first day of week 01. See also %V and %W.
- %V : The ISO 8601 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the new year.
- %w : The numeric day of the week (0-6), 0 = Sunday
- %W : The week number of the current year as a decimal number, range 00 to 53, starting with the first Monday as the first day of week 01.
- %y : Year (00-99) (2 Digit)
- %Y : Full Year (4 Digit)
Extension Operators
- %o : Date ordinal ( st / nd / rd / th )
- %J : toJSON() JavaScript Date Method output. Can be read in a parser only when it is alone.
- %Dd : Duration Days
- %Dl : Duration Hours (lowercase L)
- %DM : Duration Minutes
- %DS : Duration Seconds
- %DA : Duration Days text - e.g. Day or Days
Modifiers
- 0 : Pad with zeros (the default) - e.g. 4 -> %0d -> 04
- - : Pad with nothing - e.g. 4 -> %-d -> 4