The type: date
question type creates a date input field with an automated date picker. Respondents can select a date or enter it manually.
1. What is the date that you stayed in the hotel?
type: date
Tag | Description | Usage Example |
default date |
Indicates the date the calendar begins with. | default date: 05/01/2023 |
start date |
Sets a start date for the date entry. | start date: 05/27/2023 |
end date |
Sets an end date for the date entry. | end date: 10/30/2023 |
valid day |
Indicates the days of the week that are allowed to be selected. '0' = Sunday; '1' = Monday; '2' = Tuesday, etc. |
valid day: 12345 |
first day |
Specifies which day of the week the calendar begins on. '0' = Sunday; '1' = Monday; '2' = Tuesday, etc. |
first day: 1 |
datatype |
Specifies the date format using the following datatypes: 'date_mmddyyyy' (default) |
datatype: date_ddmmyy |
Referencing a 'type: date' question
Date questions store data in the format "YYYY-MM-DD". If you need to display the selected date later in the survey, it will display in that format. As an alternative, the response to a date question can be stored in a text variable in a different format, which you can then reference instead of the original date question.
9. What is your favorite date of the year?
type: date
9TEXT. Date in mm/dd/yyyy format
type: text
invisible: y
cvalue: return $Q9->date_mmddyyyy;
showtext: result
text: Your favorite date is $Q9TEXT.
Comments
0 comments
Please sign in to leave a comment.