Skip to content

SiTimepickerComponent documentation

import { SiTimepickerComponent } from '@siemens/element-ng/datepicker';

Input Properties

NameTypeDefaultDescription
disabled
boolean false

All input fields will be disabled if set to true.

errormessageId
string `${this.id()}-errormessage`

This ID will be bound to the aria-describedby attribute of the timepicker. Use this to reference the element containing the error message(s) for the timepicker. It will be picked by the SiFormItemComponent if the timepicker is used inside a form item.

Implements SiFormItemControl

hideLabels
boolean false

Hide the labels of the input fields.

hoursAriaLabel
TranslatableString $localize`:@@SI_DATEPICKER.HOURS:Hours`
hoursLabel
TranslatableString 'hh'

Visible label for the hours input.

hoursPlaceholder
string 'hh'

Placeholder for the hours input.

id
string `__si-timepicker-${SiTimepickerComponent.idCounter++}`

The actual id of the control that should be used in the for attribute of a label.

Implements SiFormItemControl

max
Date | undefined

A maximum time limit. The date part of the date object will be ignored.

meridians
string[] | undefined

Custom labels for the AM and PM options.

meridiansAriaLabel
TranslatableString $localize`:@@SI_DATEPICKER.PERIOD:Period`
meridiansLabel
TranslatableString 'am/pm'

Visible label for the AM/PM selector.

millisecondsAriaLabel
TranslatableString $localize`:@@SI_DATEPICKER.MILLISECONDS:Milliseconds`
millisecondsLabel
TranslatableString 'ms'

Visible label for the milliseconds input.

millisecondsPlaceholder
string 'ms'

Placeholder for the milliseconds input.

min
Date | undefined

A minimum time limit. The date part of the date object will be ignored.

minutesAriaLabel
TranslatableString $localize`:@@SI_DATEPICKER.MINUTES:Minutes`
minutesLabel
TranslatableString 'mm'

Visible label for the minutes input.

minutesPlaceholder
string 'mm'

Placeholder for the minutes input.

readonly
boolean false

Whether the time inputs are read-only.

secondsAriaLabel
TranslatableString $localize`:@@SI_DATEPICKER.SECONDS:Seconds`
secondsLabel
TranslatableString 'ss'

Visible label for the seconds input.

secondsPlaceholder
string 'ss'

Placeholder for the seconds input.

showMeridian
boolean | undefined

Show time in 12-hour period including the select to toggle between AM/PM.

showMilliseconds
boolean false

Whether the milliseconds input is displayed.

showMinutes
boolean true

Whether the minutes input is displayed.

showSeconds
boolean false

Whether the seconds input is displayed.

Output Properties

NameTypeDescription
inputCompleted
void

Emits when the user presses Enter in the final time input.

isValid
boolean

Emits whether the entered time components form a valid time.

meridianChange
string

Emits the selected meridian when it changes.

Attributes and Methods

NameTypeDefaultDescription
(readonly) labelledby
string ...

ID that should be assigned to the label element inside the SiFormItemComponent.

If the target control is not of type input, select or button, it cannot be referenced by a label. Instead, aria-labelledby must be used to create a reference to a label. In such a case, an implementation of SiFormItemControl must provide the id of the label in labelledby. SiFormItemComponent will apply the id to the label so that it can be used inside the control to reference it in the aria-labelledby attribute.

Implements SiFormItemControl

Types Documentation

import type { TranslatableString } from '@siemens/element-translate-ng/translate-types';

Represents a translatable string. This can either be a translation key, e.g. ACTIONS.EDIT that will be automatically translated when displayed on the UI or a pre-translated string, e.g. Edit. Equivalent to a normal string in usage and functionality.

import type { SiFormItemControl } from '@siemens/element-ng/form';

Common interface for form item controls. Controls that should be connected to SiFormItemComponent must implement this interface and must be provided using the SI_FORM_ITEM_CONTROL token.

Properties

Except where otherwise noted, content on this site is licensed under MIT License.