Date

Summary

The Date field lets you present a field for date data. It is available under the Advanced Fields section within the form editor.

Three input types are available: a free-form text field (default), an accessible calendar picker powered by the WhatSock datepicker library, or dropdown selectors.

GForms Date Field Icon
Date field as displayed in the Field Library
Image
Date field as displayed in the Form Editor.

Common Settings

This field uses only common field settings for the Appearance and Advanced settings. For a description of each of the common field settings, refer to this article. Below you will find a description of specialty settings that are particular to this field.

General Settings

Date Field General Settings
SettingDescription
Date Input TypeDate Field will let users free type the date (default).
Date Picker will let users select a date from an accessible calendar interface powered by the WhatSock datepicker library.
Date Drop Down will let users select date from drop downs.
IconAllows you to set an icon which will be listed beside the date field. Options include: No Icon, Calendar Icon, Custom Icon
Date FormatSelect the format you would like to use for the date input. Available options are listed below.
Sub-LabelsSelect the type of inputs you would like to use for the date field. Date Picker will let users select a date from a calendar. The date Field will let users freely type the date.

Accepted Date Formats

  • MM/DD/YYYY
  • DD/MM/YYYY
  • DD-MM-YYYY
  • DD.MM.YYYY
  • YYYY/MM/DD
  • YYYY-MM-DD
  • YYYY.MM.DD

Merge Tags

For more information on the use of merge tags, refer to these articles.

Usage

{Field Name:2:modifier}

Modifiers

ModifierDescription
:yearOutputs only the year used in the field.
:monthOutputs only the month used in the field.
:dayOutputs only the day used in the field.
:ymdOutputs the date formatted as year/month/day.
Example: 2016/10/31.
:dmyOutputs the date formatted as day/month/year.
Example: 31/10/2016.

Validation

The Date field validates that the submitted value represents a real, correctly formatted date. Validation checks that the value can be parsed according to the field’s configured date format and that the resulting day, month, and year combination is a valid calendar date.

For example, a date such as February 30 would fail validation even if the format is correct.

When the Date Field or Date Dropdown input type is used, and the field is marked as required, validation also checks that all three inputs, month, day, and year, have been completed. When the Date Picker input type is used, the error message includes the expected date format to help the user correct their entry.