Skip to main content

Decipher Support

All the topics, resources needed for Decipher.

FocusVision Knowledge Base

Date Picker Element

Overview

The Date Picker element utilizes a text area type question with date range and format validation. It allows respondents to select a date from a preconfigured calendar instead of manually typing it in.

dec_date_picker_element_001.png

Note: Survey themes do not apply to the Date Picker calendar.

Adding a Date Picker Question

Note: Adding the Date Picker element to a survey requires compat 141+.

Via the Survey Editor

To add a Date Picker question via the Survey Editor, first click the "+ Element" button within the editor and select the "Open End" question type category. Then select the "Date Picker" element and click "Add".

Note: You can set the "Show" filter to display only elements that are compatible or optimized for the devices allowed for your project. Click here to learn how to how verify your project settings.

Once you have added the Date Picker, enter your desired question text, instructions, and response options.

Configuring Question Options

The question options menu is located to the right of the staging area in the Survey Editor. Here, you can set rules for the entire question by clicking near the question text or set rules for individual rows, columns, or groups by clicking the items you wish to edit.

Question Settings

Each of the following options, when changed, affect all attributes within the element.

  • Label:  The label assigned to the element. You may edit the default label for the Date Picker element here.
  • Show If:  Create new logic conditions or select an existing logic condition for the element. For more information, click here.
  • Languages:  Select what languages the element will show in if the survey has multiple languages. The default is "all languages".
  • Mandatory:  Check to force respondents to provide a response. Respondents will be unable to continue the survey without completing the question.
  • Randomize:  Check each box to randomize the rows, columns, or groups for your question.
  • Response Length: Not used.
  • Verify:  Select a date format by which to verify respondent answers. Can be set to Date: MM/DD/YYYY, Date: DD/MM/YYYY, or Date: YYYY/MM/DD.
  • Date Range:  Select a start date for your calendar:
    • Any Date:  Calendar will allow respondents to select any date.
    • Specific Date:  Calendar will allow respondents to select only the specified date or later.
    • Dynamic Current Date:  Calendar will allow respondents to select only the current date or later.
  • To:  Select an end date for your calendar.
    • Any Date:  Calendar will allow respondents to select any date.
    • Specific Date:  Calendar will allow respondents to select only the specified date or earlier.
    • Dynamic Current Date:  Calendar will allow respondents to select only the current date or earlier.
  • More Options:  Use the drop-down menu to select less commonly used options. Once selected, you will be able to specify the setting for that option. For more information on each option, click here.
Answer Settings

The following options only affect the selected answer option (i.e., rows, columns, or groups).

  • Label:  The label assigned to the column. You may edit the default label for the column here.
  • Show If:  Allows you to create new logic conditions or select an existing logic condition for the column. For more information, click here.
  • Languages:  Select what languages the column will show in if the survey has multiple languages. The default is "all languages".
  • Do Not Randomize:  This option is only available if the "randomize" general option is selected. Checking this box will force the line to remain stationary.
  • Optional: This option is only available if the "mandatory" general option is selected. When checked it will allow for the row to become optional and non-mandatory.
  • Open End:  Not used.
  • Hidden:  The option will hide the answer option from respondents.
  • No Answer:  Converts the answer option into an exclusive checkbox response.
  • Response Length:  Not used.
  • Verify:  Not used.
    • Row Pre-Text:  Not used.
    • Post-Text:  Not used.
  • More Options:  Use the drop-down menu to select less commonly used options. Once selected, you will be able to specify the setting for that option. For more information on each option, click here.

Via the XML

To add a Date Picker question via the survey XML, first create a text question in the desired location. Then add uses="fvdatepicker.1" to the question tag, along with the daterange verifier, which follows the below syntax:

verify="daterange(FORMAT, START, END)"
  • FORMAT:  The date entry format. Can be any of the following:
    • mm/dd/yyyy
    • dd/mm/yyyy
    • yyyy/mm/dd
  • START:  The start date for the calendar. Can be any of the following:
    • any:  Calendar will allow respondents to select any date.
    • today:  Calendar will allow respondents to select only the current date or later.
    • Specific date:  Calendar will allow respondents to select only the specified date or later.
  • END:  The end date for the calendar. Can be set to any of the following:
    • any:  Calendar will allow respondents to select any date.
    • today:  Calendar will allow respondents to select only the current date or earlier.
    • Specific date:  Calendar will allow respondents to select only the specified date or earlier.

Style Settings

Changing the Week Start Day

By default, the Date Picker calendar starts every week on a Sunday. If desired, you can alter the question XML to instead start every week on a Monday.

To force calendar weeks to start on Monday, add the fvdatepicker:firstDay style attribute to the question tag, following the syntax below:

fvdatepicker:firstDay="Monday"

The fvdatepicker:firstDay attribute can take one of two values. Enter Sunday to start calendar weeks on Sunday, or Monday to start calendar weeks on Monday.

  • Was this article helpful?