SiTimepickerComponent documentation¶
selector
si-timepickerCommon 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.
Input Properties¶
| Name | Type | Default | Description |
|---|---|---|---|
| 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. |
| 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++} | |
| max ¶ | Date | A maximum time limit. The date part of the date object will be ignored. | |
| meridians ¶ | string[] | 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 | 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 | 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¶
| Name | Type | Description |
|---|---|---|
| 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¶
| Name | Type | Default | Description |
|---|---|---|---|
| (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. |
Types Documentation¶
Variable |
|---|
| 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. |
|---|
| 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. | |||||
|---|---|---|---|---|---|
|
|
| Interface for form error mapper. It resolves a key to either a translatable string or function which is called with the validation error for its key and should return a translatable string. | |
|---|---|
| |
Function The error mapper is used to resolve an angular validation error to a TranslatableString . It will be merged with already existing error mappers. | ||
|---|---|---|
|
|
| ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
| ||||||||||||||||||||||||||
|
| Deprecated: This component should no longer be used. When providing a form wide error mapper, use the provideFormValidationErrorMapper . When using the column layout, use the form-col-layout classes.For a custom breakpoint use the SCSS mixin: | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
| |||||||||||
| |||||||||||
|
| ||||||||||||
| ||||||||||||
|
Except where otherwise noted, content on this site is licensed under MIT License.