What is it?
A text field that is specifically for collecting dates, including a date picker for enhanced usability.
When should I use it?
When you need the customer to provide a date.
The date picker will display different depending on the browser used.
Chrome and Opera the date picker looks like:
In MS Edge the date picker looks like:
And the Firefox date picker looks like this:
Internet Explorer and Safari
Some browser such as Internet Explorer and Safari do not support the date input type natively, for these browser a date picker will be provided during your implementation to use instead. In these browsers the date picker looks like this:
For the latest information about browser support see Can I Use - Date and Time Input Types.
Where the users browser natively supports the date input type it will display the entered date in the format suitable for the users country.
For example for the date 29th July 2020 will be displayed for users in the UK and Austraila as 29/07/2020
In the US the date will be displayed as 07/29/2020 as per local conventions
The response to the question will be normalised when saving the answer to YYYY-MM-DD format.
Using the response
XFP will display the date in the form review page, received forms and content placeholders in the correct locale for the site however internally the date is saved in YYYY-MM-DD format.
Using the date page element response
The differences in how the date is saved and how it is displayed may cause you issue if you are not careful.
Using the response in a template mapping will provide the date in YYYY-MM-DD format. This is a standard format for system integration, for example if you are creating a case in CXM and have a date field, CXM will expect the date in the YYYY-MM-DD format. Some systems may require the date in a different format, you should check with the system provider what format they require and use the Date plus/minus days logic to convert the date to the required format.
Using the response from a date question in a logic input will provide the date in YYYY-MM-DD format. Ensure you choose this format as the input format in the date logic.
Prefilling the Date page element
See prefilling a date page element for details on how to prefill a date page element.
'What is your date of birth', 'When did you contact us'.
|Question text||The label shown next to the question|
|Required||Does the question have to be answered?|
|Default to current day||Set the initial value to today's date|
|Default to specific date||Set the initial value to a certain date|
|Only accept dates in the future||Ensure the question only accepts dates in the future|
|Only accept dates in the past||Ensure the question only accepts dates in the past|
|Only accept dates in range||Ensure the question only accepts dates within a given range|
|Only accept weekdays||Ensure the question only accepts weekdays|
|Help text||Text displayed under the question to guide the customer as to how to answer it|
|Validation fail message||An error to display if the entered date is invalid|
|Show internally||If enabled, this question will be shown on internal forms|
|Show publicly||If enabled, this question will be shown on online forms|