Time input field
Use time_input to collect a time from a respondent. You can choose 12-hour or 24-hour display and restrict the allowed times.
Configuration
Every field also accepts shared field properties. The table lists the properties specific to time_input.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
placeholder | string | No | An example time in the field’s format; --:-- when the field shows a list of times | Hint shown before a time is entered. Supports {{field}} piping. |
defaultValue | string | No | None | Time entered initially, in the field’s format. May use "{{hidden_name}}". |
format24Hour | boolean | No | true | true uses 24-hour time; false uses 12-hour time with AM/PM. |
includeSeconds | boolean | No | false | Collects seconds when true. |
minTime | string or null | No | None; no earliest time | Earliest time that can be picked, in 24-hour HH:mm format, such as "09:00". |
maxTime | string or null | No | None; no latest time | Latest time that can be picked, in 24-hour HH:mm format. It must not be before minTime; the maximum itself can be picked. |
minuteStep | integer or null | No | None; any minute is accepted | Allowed values are 5, 10, 15, 30, or 60. Times are spaced from minTime, or from midnight if minTime is not set. |
When minTime, maxTime, or minuteStep is set, the field shows a list of allowed times. If only minTime or maxTime is set, the list uses 15-minute intervals. A range where minTime is later than maxTime is ignored.
Validation
If the field is required and empty, the respondent cannot continue. A time that does not match the selected format, falls outside the configured range, or does not match the minute step also blocks the page. The format, range, and step are checked again at submission; if the answer fails, the submission is rejected and the respondent is asked to pick another time.
Submission value
The answer is a string: HH:MM or HH:MM:SS in 24-hour format, or H:MM AM/PM or H:MM:SS AM/PM in 12-hour format.
Example
{
"type": "time_input",
"name": "appointment_time",
"label": "What time works for you?",
"format24Hour": false,
"minTime": "09:00",
"maxTime": "17:30",
"minuteStep": 30,
"required": true
}