Calm motion: animations on this site only fade, with no movement
TimezonePicker
IANA time zone search with offsets
A search field for a time zone: a user profile, an event, a meeting. People type a city or an offset, and the list shows the zone name with its offset from UTC. The component ships no zone list. It reads the zones and the offsets from Intl, so they follow the rules of the browser.
Basic
No results.
v-modelis the IANA name, for exampleAsia/Jakarta. Store this name, not the offset, because the offset changes with summer time.- The list runs west to east, then by name. An underscore in a name shows as a space. Type
jakartaor+5:30to narrow it. atis the moment that sets the offsets (default now). Pass a fixed date to show the offsets of an event, or to make the server and the browser agree.detectchooses the zone of the device after mount when the value is empty. The server cannot know it, so the choice never happens during server rendering. A device zone that is not in the list is ignored.zonesreplaces the list, for example with the six zones that your product supports. Where the browser has noIntl.supportedValuesOf, the default list is empty. Passzonesthere.- It is a Combobox. Other props, such as
size,invalid, andlabel, go to it.
Usage
ts
import { BlessTimezonePicker } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
zones | string[] | — | zones to offer. The default is every IANA zone of the runtime. |
at | Date | — | the moment that sets the offsets, so summer time shows right. Default: now. |
detect | boolean | — | choose the zone of this device after mount when the value is empty |
placeholder | string | "Search a city or an offset" | |
modelValue | string | — | the IANA name, for example `Asia/Jakarta` |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: string | undefined] |