How to configure the datepicker.

This article will go over the functionalities of the datepicker inside the SiteManager form. You will need at least design access to be able to configure these options.

  1. Datepicker functionalitiesLanguage: The language in which dates will be shown. All months, weeks and days will be shown in the selected language.
  2. Date format: The format in which the date will be formatted. This format will always be sent to the server, but can be overwritten with an alternate format, to show a different format to the visitor.
  3. Custom date format: The format in which the date will be formatted. You can customize the format freely however you want. Be sure to only use valid formats, as broken down below.
  4. Alternate format: The format that will be shown to the visitor.
  5. Custom alternate format: The format that will be shown to the visitor. You can customize the format freely however you want. Be sure to only use valid formats, as broken down below.
  6. Default date: The initial selected date in the datepicker. See here for more explanation about valid inputs.
  7. Minimum date: The minimum date that can be selected by the user. See here for more explanation about valid inputs.
  8. Maximum date: The maximum date that can be selected by the user. See here for more explanation about valid inputs.
  9. Timepicker: Whether to also show a timepicker. You can further configure the timepicker to your liking here.
  10. Week numbers: Enables display of week numbers in the calendar.
  11. Shorthand current month: Choose whether to show the current month in a shorthand version or to display the full name.
  12. Allow input: Allow the user to manually input a date.
  13. Enable mobile: Enable or disable the datepicker on mobile. We strongly advise to use the native datepicker, except if you're using a lot of functionalities, such as the timepicker. A native datepicker will always be superior to the custom one on mobile devices.

Date format

Each character in the table below can be used in Custom date format and Custom alternate format options to achieve the format you need.

Date formatting tokens

Character Description Example

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)
W Numeric representation of the week 0 (first week of the year) through 52 (last week of the year)
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

Character Description Example
H Hours (24 hours) 00 to 23
h Hours 1 to 12
G Hours, 2 digits with leading zeros 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

Supported dates

It is possible to supply a date for the default date, minimum date and maximum date. This date should be in a specific format, otherwise it won't be recognized. See the list below for the supported formats.

  • The shortcut today: Using today will always set the date to the current day. This way you don't have to manually update this value each day.
  • Dates in the current format: You can input your date in the same exact format that you have configured in the relevant panel. For example, the default format is Y-m-d G:i, so the following dates are all valid:
    • 2016
    • 2016-10
    • 2016-10-20
    • 2016-10-20 15
    • 2016-10-20 15:30
  • ISO date: A valid ISO date can be used to supply a date. For example, 2017-02-26T19:40:03.243Z is a valid ISO date. See here for more info regarding ISO dates.