Vivid Logo Vivid

Time Picker

Labelling

Label Text

The label attribute provides a short description of the purpose of the Time Picker.

If a visible label can't be used, provide one using the aria-label attribute. This ensures screen readers announce the purpose of the element, making it accessible to all users.

Helper Text

The helper-text attribute provides additional information to help the user enter the correct information.

To add HTML to the helper text, use the helper-text slot.

Value

The value attribute contains the currently selected time.

Empty string or undefined represent no time being selected.

It will always contain a valid time in the format HH:MM:SS when a time is selected. If the user types an invalid time, value will be empty.

Validation Feedback

Error Text

The error-text attribute provides a custom error message. Any current error state will be overridden by error-text.

Clock

The Time Picker will display the time in 12h or 24h format depending on the configured locale.

Use the clock attribute to override this behavior.

Minutes Step

Use the minutes-step attribute to configure the step between minutes in the Time Picker.

Seconds Step

Use the seconds-step attribute to configure the step between seconds in the Time Picker.

If not set, the Time Picker will not display seconds.

Min

Set the min attribute to configure the earliest time to accept. The user will be prevented from choosing an earlier time, however it is still possible to manually enter one.

Max

Set the max attribute to configure the latest time to accept. The user will be prevented from choosing a later time, however it is still possible to manually enter one.

Disabled

The disabled attribute disables the Time Picker input element.

Read Only

The readonly attribute prevents the user from changing the Time Picker input element value.