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 When not set, the component is associated with its ancestor form element, if one exists. | string | |
| labelText | label-text | Specifies the component's label text. | string | |
| maxItems | max-items | Specifies the component's maximum number of options to display before displaying a scrollbar. | number | 0 |
| messageOverrides | Overrides individual strings used by the component. | 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 | |
| offsetStyle | offset-style | When
| OffsetStyle | "user" |
| open | open | When | boolean | false |
| overlayPositioning | overlay-positioning | Specifies the type of positioning to use for overlaid content, where:
| OverlayPositioning | "absolute" |
| 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 | |
| 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 Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components. | boolean | false |
| validationIcon | validation-icon | Specifies the validation icon to display under the component. | IconName | boolean | |
| validationMessage | validation-message | Specifies the validation message to display under the component. | string | |
| 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 |
Slots
| Name | Description |
|---|---|
| label-content | A slot for rendering content next to the component's |
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> |