Reference

Time

A time picker field

The time field is perfect for events or any other kind of time-based field content. It creates a selectbox with all available times of the date defined by certain interval.

Example

fields:
  time:
    label: Time
    type: time

Options

Option Type Required Default Description
after mixed Optional text that will be shown after the input
autofocus bool Sets the focus on this field when the form loads. Only the first field with this label gets
before mixed Optional text that will be shown before the input
default mixed Sets the default time when a new Page/File/User is created
disabled bool If true, the field is no longer editable and will not be saved
help mixed Optional help text below the field
icon string clock Changes the clock icon
label mixed The field label can be set as string or associative array with translations
notation int 24 12 or 24 hour notation. If 12, an AM/PM selector will be shown.
required bool If true, the field has to be filled in correctly to be saved.
step int 5 The interval between minutes in the minutes select dropdown.
translate bool true If false, the field will be disabled in non-default languages and cannot be translated. This is only relevant in multi-language setups.
width string 1/1 The width of the field in the field grid. Available widths: 1/1, 1/2, 1/3, 1/4, 2/3, 3/4

Notation

You can choose between the 12 hour (AM/PM) and the 24 hour format. The default is the 24 hour format.

fields:
  time:
    label: Time
    type: time
    notation: 12

Step

Intervals between selectable options are defined in minutes. The default is 60 minutes.

fields:
  time:
    label: Time
    type: time
    step: 30

Default value

The default value can either be set to a specific time (e.g. 17:00) – and will be matched with the closest interval option – or as now.

fields:
  time:
    label: Time
    type: time
    default: now