- Documentation
- User Application
- Templates
- Fields
Date
A Date field holds a date, or a date and time, that the client picks from a calendar. It is available in HTML and PDF templates.
To record the date when the form is submitted, use an Auto Date field. For the settings that all fields share, such as permissions, dependencies and style, see Field settings.
A new Date field isn’t required, and both the client and the agent can edit it.
Values & Display
Section titled “Values & Display”| Setting | What it does |
|---|---|
| Add time | The client picks a date and a time. Off by default. |
| Show clear buttons | Shows an X button that empties the field. It is shown only to people who can edit the field. Off by default. |
Validation
Section titled “Validation”
| Setting | What it does |
|---|---|
| Set Minimum Date | The earliest date allowed, relative to today. See Minimum and maximum dates. |
| Set Maximum Date | The latest date allowed, relative to today. |
| Select date format | How the date is written. See Date formats. |
| Error if no value entered | The message shown when a required field is empty. Leave it empty to show the default message. |
Minimum and maximum dates
Section titled “Minimum and maximum dates”Each limit has four boxes: Years, Months, Weeks and Days. The numbers are added to today’s date, and negative numbers go back in time. In a limit that you use, empty boxes count as 0. Leave all the boxes of a limit empty for no limit.
For example:
- To allow dates from one month ago until tomorrow, enter -1 in Months of Set Minimum Date, and 1 in Days of Set Maximum Date.
- To make sure the client is at least 18 years old, in a birth date field, enter -18 in Years of Set Maximum Date.
The limits are counted from the day the form is filled in, and the dates on the limits are allowed.
In the form, the calendar lets the client pick only dates within the limits. A date outside them, for example one that the client typed, shows an error that starts with “Minimum date is” or “Maximum date is”, and the form can’t be submitted.
Date formats
Section titled “Date formats”The formats in Select date format depend on Add time:
| Without Add time | With Add time |
|---|---|
| dd/mm/yyyy: 28/02/2022 | dd/mm/yyyy hh:mm: 28/02/2022 23:35 |
| mm/dd/yyyy: 02/28/2022 | mm/dd/yyyy hh:mm: 02/28/2022 11:35PM |
| dd MMM yyyy: 02 FEB 2022 | dd MMM yyyy hh:mm: 02 FEB 2022 23:35 |
| dd MMM yyyy hh:mm: 02 FEB 2022 11:35AM |
If you don’t select a format, the date is written as dd/mm/yyyy, with a 24-hour time when Add time is on. In the dd MMM yyyy formats, the short name of the month is in the language of the form.
When you turn Add time on or off, select the format again.
Default value
Section titled “Default value”Set the default value on the Conditional Values tab. Type a date in the field’s format, for example 28/02/2022, or type $now for the date (and the time, with Add time) when the transaction is created. You can also calculate the date with a formula. See Default Value.
A value that isn’t a date shows “Unexpected date format”.
In the form
Section titled “In the form”The client picks the date from a calendar, or types it in the field’s format. With Add time, the client also picks the hour and the minutes.
When the client uses the form with the keyboard, from the accessibility menu, the calendar doesn’t open by itself, and the client types the date.
The value
Section titled “The value”The date is saved as text, exactly as it is shown in the field, for example 28/02/2022 or 28/02/2022 23:35. Webhooks and the archive receive this text, and the signed PDF prints it.
Conditions
Section titled “Conditions”In conditions, a Date field supports Greater than (after the date) and Less than (before the date). Compare with a date, or with a date relative to today: a number with y for years, m for months, w for weeks or d for days. For example, Less than -18y is true when the date is more than 18 years before today.