Input Time Zone is an input-driven component containing a list of worldwide time zones.
Overview
Input Time Zone enables a user to select a time zone. Where no value is provided, the user's time zone will be selected by default.
Sample
Usage
- Choosing a time zone
Accessibility
Keyboard navigation
| Key | Function |
|---|---|
Tab | Moves focus in and out of the component. |
Tab and Shift | Moves focus in and out of the component. |
Arrow down | When the component is not open, opens the component. When open, focus shifts to the next value. |
Arrow up | When the component is open, focus shifts to the previous value. |
Home | When the component is open, focus shifts to the first value. |
End | When the component is open, focus shifts to the last value. |
Esc | When the component is open, closes the component and shifts focus back to the input. |
API reference
Properties
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
| clearable | clearable | When When | boolean | false |
| disabled | disabled | When | boolean | false |
| form | form | Specifies the | string | undefined | |
| label | label | Specifies an accessible label for the component. | string | undefined | |
| labelText | label-text | Specifies the component's label text. | string | undefined | |
| maxItems | max-items | Specifies the component's maximum number of options to display before displaying a scrollbar. | number | 0 |
| messageOverrides | Replace localized message strings with your own strings. Note: Individual message keys may change between releases. | Record<string, unknown> | undefined | ||
| mode | mode | This specifies the type of Using Using | TimeZoneMode | "offset" |
| name | name | Specifies the name of the component. Required to pass the component's | string | undefined | |
| offsetStyle | offset-style | When
| OffsetStyle | "user" |
| open | open | When | boolean | false |
| overlayPositioning | overlay-positioning | Specifies the type of positioning to use for overlaid content.
| OverlayPositioning | "absolute" |
| placeholder | placeholder | Specifies placeholder text for the component. | string | undefined | |
| readOnly | read-only | When | boolean | false |
| referenceDate | reference-date | This It can be either a Date instance or a string in ISO format ( | Date | string | undefined | |
| scale | scale | Specifies the size of the component. | Scale | "m" |
| status | status | Specifies the input field's status, which determines message and icons. | Status | "idle" |
| topLayerDisabled | top-layer-disabled | When | boolean | false |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | IconName | boolean | undefined | |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | undefined | |
| validity | The component's current validation state. | ValidityState | ||
| value | value | The component's value, where the value is the time zone offset or the difference, in minutes, between the selected time zone and UTC. If no value is provided, the user's time zone offset will be selected by default. | string | undefined |
Slots
| Name | Description |
|---|---|
| label-content | A slot for rendering content next to the component's |
Styles
| Name | Description |
|---|---|
| --calcite-input-time-zone-corner-radius | Specifies the component's corner radius. |
Events
| Name | Description | Behavior |
|---|---|---|
| calciteInputTimeZoneBeforeClose | Fires when the component is requested to be closed and before the closing transition begins. | |
| calciteInputTimeZoneBeforeOpen | Fires when the component is added to the DOM but not rendered, and before the opening transition begins. | |
| calciteInputTimeZoneChange | Fires when the component's | |
| calciteInputTimeZoneClose | Fires when the component is closed and animation is complete. | |
| calciteInputTimeZoneOpen | Fires when the component is opened and animation is complete. |
Methods
| Name | Description | Signature |
|---|---|---|
| componentOnReady | Creates a promise that resolves once the component is fully loaded. | componentOnReady(): Promise<this> |
| setFocus | Sets focus on the component. | setFocus(options?: FocusOptions): Promise<void> |