Toggle menu

Date Picker

This field lets a user pick a date. You are able to set the format the date should be entered in. A pop-up calendar may be provided by the browser.

Various in-built validation options exist which can restrict the date range, or only allowing the user to select weekdays or weekends. The field also includes a regular expression editor and JavaScript validation function if you need to create more complex validation.

Properties

LabelDescriptionType Name
LabelThe label for this fieldLABEL
Show LabelWhether to show the label for this field or not. This property adds/removes a class on the field's label element. The styling itself is controlled by the site's stylesheetSHOWLABEL
HintAdditional information displayed alongside the field to assist the user in completing it. The value of another field can be used by adding the field's name between # characters. See Common Field Properties for more informationHINT
RequiredWhether or not the field is required to have a value to pass validationREQUIRED
WidthThe display width of the field. The value matches a CSS class, which actually sets the widthWIDTH
FormatThe format used to store the date. Pick one from the drop-down list. "YYYY-MM-DD" is recommended.

Note that the displayed date is not affected by this setting, it will always be formatted according to the user's locale (as determined by the browser or operating system)
FORMAT
SearchableWhether this field's value should be indexed by the search (the object collection if using the database save action and/or workflow process collection if starting a workflow process).

This property is ignored if an External Type is specified for the form. In this case, the ability to search is determined by the searchable property of the type itself
SEARCHABLE
Search FormatHow the date should be represented in the search index.

Select "Date" to index the date as a date/time (UTC). Note that for backwards compatibility with an older version of this field type, it is still possible to index the value as a string
SEARCHFORMAT
DefaultA default value for the field. This must match the format selected in the Format propertyDEFAULT
After DateRestrict the entered date to one that falls after a particular date. This should be entered in a format that matches the Format property, and we recommend you use YYYY-MM-DD.

If the 'Range' setting is set to Future or Future+Today, it will take precedence over any date specified via this setting
AFTERDATE
Before DateRestrict the entered date to one that falls before a particular date. This should be entered in a format that matches the Format property, and we recommend you use YYYY-MM-DD.

If the 'Range' setting is set to Past or Past+Today, it will take precedence over any date specified via this setting
BEFOREDATE
RangeRestrict the date that can be chosen to the past or the future, including or excluding todayRANGE
Valid DaysUse the drop-down list to restrict date input to weekdays or weekends.

This setting will not affect the date picker, both weekdays and weekends will still be selectable, but it will be used by the field validation to ensure that the selected date matches the selected option
VALIDDAYS
Regular ExpressionEnter a regular expression that will be used to validate the date. 

For example, you could restrict the date to any date in June, July or August with:

/^..\-0[6-8]\-....$/
This example assumes a date format of YYYY-MM-DD.
REGEX
Error MessageThe error message that will be displayed if this field fails validationERRMSG
Validation FunctionA JavaScript function that can be used to provide custom field validation whenever the field value changes or the form is submitted. This function will be executed client-side, provided JavaScript is enabled in the browser, and repeated server-sideVALFUNC
Default FunctionA JavaScript function that can be used to calculate the default field value. This function is executed server-side when the field HTML is generated and is useful when the DEFAULT property is insufficientDEFFUNC
HandlersA JavaScript function that is executed client-side whenever the page loads, or the field value changes. This function is useful for modifying the values of other fields based on an entered valueHANDLERS
Read OnlyDisplay the field as read onlyREADONLY
Additional Styling ModifierAn optional CSS modifier for the field. See Common Field Properties for an exampleADDITIONALSTYLINGMODIFIER
DocumentationAdd documentation to your field to help explain any complex functionality to future users. You might include information on what the field does and how it relates to other fields on the form. Notes added here are only ever visible in the Forms Designer, they can be searched for, viewed and downloaded from the action panel. See Common Field Properties for an exampleDOCUMENTATION

Share this page

Facebook icon Twitter icon email icon

Print

print icon