timefield

This component displays a time field.

Configuration

For general configuration options, see General Component Configuration.

Specific Configuration

type ("timefield")

Component type.

value (Binding | date-string)

Field value. Absolute times can be specified in the following formats: HH:mm, HH:mm:ss, HH:mm a, HH:mm A, YYYY-MM-DDTHH:mm:ss.sssZ. As with the date field, times in the submit are always displayed in the YYYY-MM-DDTHH:mm:ss.sssZ format if a user has edited the date. An unedited time entry does not change the format and remains in the specified format.

General Configuration

In addition to the configurations that apply to all fields, the following configurations can optionally be set: //boxLabel settings, disabled, errorTarget, icon, label, label settings, onChange, readOnly, required.

Custom Styling

The visual design of the date fields is primarily controlled via global variables. CSS can be used selectively for specific customizations.

The cls , you can apply your own CSS rules. The component provides the following standard styling targets for this purpose:

.timefield

Styles for the time field container.

.timefield-label / .timefield .label

Direct access to the time field label.

.timefield .value

Access to the time field input element.

Example

timefield.json
{
  "$schema": "https://forms.virtimo.net/5.0.x/schema.json",
  "metaData": {
    "id": "0",
    "version": 0
  },
  "configuration": {},
  "components": [
    {
      "type": "container",
      "label": "Timefield Component Example",
      "languageButton": true,
      "components": [
        {
          "type": "timefield",
          "value": "05:31 PM"
        },
        {
          "type": "timefield",
          "value": "07:42"
        },
        {
          "type": "timefield",
          "value": "${/data/timefields/three}"
        },
        {
          "type": "timefield",
          "label": "Start of hour",
          "value": "now/h"
        }
      ]
    }
  ],
  "state": {
    "data": {
      "timefields": {
        "three": "2025-12-30T23:14:12.000Z"
      }
    }
  }
}
Embedded preview

Keywords: