Timezone Picker

Finds time zones by city, country or abbreviation and lists every meaning of ambiguous ones like IST or CST instead of guessing.

StopsMeeting scheduled in the wrong zone

Installation

pnpm dlx shadcn@latest add https://bollard-ui.vercel.app/r/timezone-picker.json

The files land in your project. They're yours to edit.

Usage

timezone-picker-usage.tsx
import { TimezonePicker } from "@/components/ui/timezone-picker"

<TimezonePicker label="Meeting time zone" defaultValue="Europe/London" deviceTimeZone="Asia/Kolkata" />

What it catches

  • Ambiguous abbreviations, with all their meanings
  • A clock change within dstWarningDays
  • A pick that differs from the device's zone, with use-device option
  • Local time and UTC offset for each result

Props

TimezonePicker props
PropTypeDefault
label

Visible label.

string"Time zone"
value

Selected IANA zone, e.g. "Asia/Kolkata".

string—
defaultValue

Starting IANA zone when uncontrolled.

string"UTC"
onValueChange

Called with the chosen IANA zone.

(timeZone: string) => void—
deviceTimeZone

Override the detected device zone (tests, demos).

string—
dstWarningDays

Warn about a clock change this many days ahead.

number30
locale

Locale for times and names.

string—
placeholder

Placeholder of the search input.

string—
ambiguousText

`{abbr}` and `{count}` are filled in.

string—
noResultsText

Shown when nothing matches.

string—
dstText

`{direction}` (forward/back), `{amount}`, `{date}` and `{offset}` are filled in.

string—
mismatchText

`{city}` and `{gap}` are filled in.

string—
useDeviceLabel

Label of the use-device-zone button.

string—
messages

Override any text (see `TIMEZONE_PICKER_MESSAGES`).

Partial<TimezonePickerMessages>—

* required. Also accepts the native props of <div> (className, aria-*, data-*…), passed through to it.

Accessibility

  • Visible <label>; input is a combobox with aria-expanded, aria-controls and aria-activedescendant
  • Arrow keys move, Enter picks, Escape clears
  • Results are a listbox of options with aria-selected; status is role=status
  • Animations respect reduced motion

Only what the source does. Test with your own screen reader and content before shipping.

Limitations

  • Search covers popular zones and aliases; obscure zones may need the IANA name
  • Offsets come from the runtime's tz database

What it stops

Meeting scheduled in the wrong zone

Also known as

timezone · time zone · ist · utc offset · tz select · iana · calendar · settings

Field type

Dependencies

Pairs well with