How to use the date (and time) block
Learn everything you need to know to use the date (and time) block in your forms.
When to use
Use the date block to let your respondents select a date and optionally a time, for example to make an appointment.
How to use
Add a new block to your form and then select the question type Date
. You can now customize this block to your needs with the following features:
General
- Text
Use theText
feature for the name/title of this block. - Description
Enable theDescription
feature to add a description to this block. - Placeholder
Enable thePlaceholder
feature to add a text inside the empty input control of this block. - Help text
Enable theHelp text
feature to add a help text to this block.
Settings
- Time
Enable theTime
feature to let your respondents also enter a time with the date. - Range
Enable theRange
feature to let the block ask for two dates, namely aFrom
date and aTo
date. The form will automatically show two date fields if this feature is enabled. - Limits
Enable theLimits
feature to determine in between what dates the answered date(s) have to be. You can select the minimum and maximum date (including an optional time). Next to static date limits you can also determine if the date that your respondent selects has to beIn the future
and/orIn the past
. This will be checked at the moment the respondent fills out the form.
Options
- Required
By default this block is not required to fill out by your respondents. Enable theRequired
feature to make this block required to fill out. - Visibility
By default this block is visible in your form. Enable theVisibility
feature to hide it for your respondents. - Alias
By default the name/title of this block will be used in your dataset. Enable theAlias
feature to use a different name in your dataset. - Exportability
By default the collected data of this block will be stored to the dataset of each result. Enable theExportability
feature to take control over the storage. You can then include/exclude the data from your dataset. Please note that if you exclude data from the dataset you can never see and/or use the given answers from your respondents to this block, because the data is simply not stored at all.
Logic
Logic is important to make your forms smart and conversational. The date block can work with the following branch conditions to help you with that:
Block conditions
- Date (and time) is equal to
your filter
; - Date (and time) is not equal to
your filter
; - Date (and time) is before
your filter
; - Date (and time) is after
your filter
; - Date (and time) is between
your filters
; - Date (and time) is not between
your filters
; - Date (and time) is empty;
- Date (and time) is not empty.
If the Range
is enabled, you can use these conditions for the From
date and the To
date separately.
Filters
When we mention your filter(s)
above, there are some different filters that you can use to make the right comparison:
- Current date/time - Compare with the current date (and time) of the moment of form usage by a respondent;
- Fixed date/time - Compare with a fixed date (and time) that you enter;
- Value - Compare with another block value entered in the form by a respondent (more info).
Calculations
You can use the calculator block to perform calculations with given answers. The date block supports the following calculation operations:
- Compare - Compare a date and output a value based on the result of the comparison;
- Age - Calculate the age (time) between two points in time;
- Year - Retrieve the year of a date;
- Month - Retrieve the month of a date (1-12);
- Day of month - Retrieve the day of month of a date (1-31);
- Day of week - Retrieve the day of week of a date (0-6).