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.

NameTypeRequiredDefaultDescription
placeholderstringNoAn example time in the field’s format; --:-- when the field shows a list of timesHint shown before a time is entered. Supports {{field}} piping.
defaultValuestringNoNoneTime entered initially, in the field’s format. May use "{{hidden_name}}".
format24HourbooleanNotruetrue uses 24-hour time; false uses 12-hour time with AM/PM.
includeSecondsbooleanNofalseCollects seconds when true.
minTimestring or nullNoNone; no earliest timeEarliest time that can be picked, in 24-hour HH:mm format, such as "09:00".
maxTimestring or nullNoNone; no latest timeLatest time that can be picked, in 24-hour HH:mm format. It must not be before minTime; the maximum itself can be picked.
minuteStepinteger or nullNoNone; any minute is acceptedAllowed 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 }