Date

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.

Browser Support

The date picker will display different depending on the browser used.

Chrome and Opera the date picker looks like:

A textbox containing “dd/mm/yyyy”, an increment/decrement button combo, and a downward arrow that opens into a calendar control.

In MS Edge the date picker looks like:

A textbox containing “mm/dd/yyyy”, but when interacted with, opens a tri-column date selector.

And the Firefox date picker looks like this:

Another “dd/mm/yyyy” textbox that expands into a selectable calendar control.

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:

date-picker-safari

For the latest information about browser support see Can I Use - Date and Time Input Types.

Localisation

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.

In Content

Outputting the date via a placeholder within content (page instructions, show content on form completion, email etc...) will display the date according to the site locale setting.

In Templates

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.

In Logic

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.

Example scenarios

'What is your date of birth', 'When did you contact us'.

Settings

Name Description
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

results matching ""

    No results matching ""