Skip to content

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.

Usage

  • Choosing a time zone

Sample

Accessibility

Keyboard navigation

KeyFunction
TabMoves focus in and out of the component.
Tab and ShiftMoves focus in and out of the component.
Arrow downWhen the component is not open, opens the component. When open, focus shifts to the next value.
Arrow upWhen the component is open, focus shifts to the previous value.
HomeWhen the component is open, focus shifts to the first value.
EndWhen the component is open, focus shifts to the last value.
EscWhen the component is open, closes the component and shifts focus back to the input.

API reference

Properties

PropertyAttributeDescriptionTypeDefault
clearableclearableWhen true, an empty value (null) will be allowed as a value. When false, an offset or name value is enforced, and clearing the input or blurring will restore the last valid value.booleanfalse
disableddisabledWhen true, prevents interaction and decreases the component's opacity.booleanfalse
formformSpecifies the id of the component's associated form. When not set, the component is associated with its ancestor form element, if one exists.string
labelTextlabel-textSpecifies the component's label text.string
maxItemsmax-itemsSpecifies the component's maximum number of options to display before displaying a scrollbar.number0
messageOverridesOverrides individual strings used by the component.Record<string, unknown> | undefined
modemodeThis specifies the type of value and the associated options presented to the user: Using "offset" will provide options that show timezone offsets. Using "name" will provide options that show the IANA time zone names.TimeZoneMode"offset"
namenameSpecifies the name of the component. Required to pass the component's value on form submission.string
offsetStyleoffset-styleWhen mode is "offset", specifies how the offset will be displayed, where "user" uses UTC or GMT depending on the user's locale, "gmt" always uses GMT, and "utc" always uses UTC.OffsetStyle"user"
openopenWhen true, displays and positions the component.booleanfalse
overlayPositioningoverlay-positioningSpecifies the type of positioning to use for overlaid content, where: "absolute" works for most cases - positioning the component inside of overflowing parent containers, which affects the container's layout, and "fixed" is used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed".OverlayPositioning"absolute"
readOnlyread-onlyWhen true, the component's value can be read, but controls are not accessible and the value cannot be modified.booleanfalse
referenceDatereference-dateThis date will be used as a reference to Daylight Savings Time when creating time zone item groups. It can be either a Date instance or a string in ISO format ("YYYY-MM-DD", "YYYY-MM-DDTHH:MM:SS.SSSZ").Date | string
scalescaleSpecifies the size of the component.Scale"m"
statusstatusSpecifies the input field's status, which determines message and icons.Status"idle"
topLayerDisabledtop-layer-disabledWhen true and the component is open, disables top layer placement. Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.booleanfalse
validationIconvalidation-iconSpecifies the validation icon to display under the component.IconName | boolean
validationMessagevalidation-messageSpecifies the validation message to display under the component.string
validityread-onlyThe component's current validation state.MutableValidityState
valuevalueThe 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

NameDescription
label-contentA slot for rendering content next to the component's labelText.

Events

NameDescriptionBehavior
calciteInputTimeZoneBeforeCloseFires when the component is requested to be closed and before the closing transition begins.bubblescomposed
calciteInputTimeZoneBeforeOpenFires when the component is added to the DOM but not rendered, and before the opening transition begins.bubblescomposed
calciteInputTimeZoneChangeFires when the component's value changes.bubblescomposed
calciteInputTimeZoneCloseFires when the component is closed and animation is complete.bubblescomposed
calciteInputTimeZoneOpenFires when the component is opened and animation is complete.bubblescomposed

Methods

NameDescriptionSignature
componentOnReadyCreate a promise that resolves once component is fully loaded.componentOnReady(): Promise<this>
setFocusSets focus on the component.setFocus(options?: FocusOptions): Promise<void>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.