Skip to main content

Time input

Ask AIView as Markdown
Copy a prompt to ask an AI assistant about this page.

Time inputs allow users to enter and select times in a standardized format, ensuring consistency and accuracy.

Time input - Code

Basic​

Label​

Disabled​

Readonly​

Validation​

Slots​

API for ix-time-input​

Properties​

Since 5.0.0
Description

ARIA label for the time picker toggle button

Will be set as aria-label for the nested HTML button element

Attribute
aria-label-time-toggle-button
Type
string | undefined
Default
'Toggle time picker'
Description

Disabled attribute.

Attribute
disabled
Type
boolean
Default
false
Description

Enable Popover API rendering for dropdown.

Attribute
enable-top-layer
Type
boolean
Default
false
Description

Format of time string.

See https://moment.github.io/luxon/#/formatting?id=table-of-tokens for all available tokens.

Attribute
format
Type
string
Default
'TT'
Description

Helper text below the input field.

Attribute
helper-text
Type
string | undefined
Description

Hides the header of the picker.

Attribute
hide-header
Type
boolean
Default
false
Description

Interval for hour selection.

Attribute
hour-interval
Type
number
Default
1
Since 6.0.0
Description

Label for the AM button in 12-hour mode.

Attribute
i18n-am
Type
string
Default
'AM'
Since 6.0.0
Description

Text of the time picker cancel button. Cancel, pressing Escape or

clicking outside the dropdown discards the time picked in the dropdown.

Attribute
i18n-cancel
Type
string
Default
'Cancel'
Description

I18n string for the error message when the time is not parsable.

Attribute
i18n-error-time-unparsable
Type
string
Default
'Time is not valid'
Description

Text for the time picker hour column header.

Attribute
i18n-hour-column-header
Type
string
Default
'hr'
Description

Text for the time picker millisecond column header.

Attribute
i18n-millisecond-column-header
Type
string
Default
'ms'
Description

Text for the time picker minute column header.

Attribute
i18n-minute-column-header
Type
string
Default
'min'
Since 6.0.0
Description

Label for the PM button in 12-hour mode.

Attribute
i18n-pm
Type
string
Default
'PM'
Description

Text for the time picker second column header.

Attribute
i18n-second-column-header
Type
string
Default
'sec'
Description

Text of the time picker confirm button.

Attribute
i18n-select-time
Type
string
Default
'Confirm'
Description

Text for the time picker top label.

Attribute
i18n-time
Type
string
Default
'Time'
Description

Info text below the input field.

Attribute
info-text
Type
string | undefined
Description

Error text below the input field.

Attribute
invalid-text
Type
string | undefined
Description

Label of the input field.

Attribute
label
Type
string | undefined
Since 6.0.0
Description

Locale identifier (e.g. 'en' or 'de'). Passed to the embedded time picker for locale-aware parsing and formatting.

Attribute
locale
Type
string | undefined
Since 5.0.0
Description

Latest selectable time (format tokens). Invalid non-empty values are ignored.

Attribute
max-time
Type
string | undefined
Description

Interval for millisecond selection.

Attribute
millisecond-interval
Type
number
Default
100
Since 5.0.0
Description

Earliest selectable time (format tokens). Invalid non-empty values are ignored.

Attribute
min-time
Type
string | undefined
Description

Interval for minute selection.

Attribute
minute-interval
Type
number
Default
1
Description

Name of the input element.

Attribute
name
Type
string | undefined
Description

Placeholder of the input element.

Attribute
placeholder
Type
string | undefined
Description

Readonly attribute.

Attribute
readonly
Type
boolean
Default
false
Description

Required attribute.

Attribute
required
Type
boolean | undefined
Description

Interval for second selection.

Attribute
second-interval
Type
number
Default
1
Description

Show text as tooltip.

Attribute
show-text-as-tooltip
Type
boolean | undefined
Description

If false, pressing Enter will submit the form (if inside a form).

Set to true to suppress submit on Enter.

Attribute
suppress-submit-on-enter
Type
boolean
Default
false
Description

Text alignment within the time input. 'start' aligns the text to the start of the input, 'end' aligns the text to the end of the input.

Attribute
text-alignment
Type
"end" | "start"
Default
'start'
Description

Valid text below the input field.

Attribute
valid-text
Type
string | undefined
Description

Value of the input element.

Attribute
value
Type
string
Default
''
Description

Warning text below the input field.

Attribute
warning-text
Type
string | undefined

Methods​

Events​

Description

Change event. Emitted when the time input loses focus and the value has changed.

Event
ixChange
Detail
string
Description

Validation state change event. Emitted when the validation state changes.

Event
validityStateChange
Detail
{ patternMismatch: boolean; valueMissing: boolean; invalidReason?: string | undefined; }
Description

Value change event. Emitted when the input value changes.

Event
valueChange
Detail
string

Slot​

Description

Element will be displayed at the end of the input

Description

Element will be displayed at the start of the input