Timezone picker
A time zone found by typing, each row with its offset and the time there.
import { TimezonePicker, deviceTimezone, convertTime, timezoneOffset } from "@forgeron/ui";import { TimezonePicker } from "@forgeron/ui";
export default function Search() {
return (
<div style={{ width: 320 }}>
<TimezonePicker
label="Time zone"
defaultValue="Europe/Paris"
now={Date.UTC(2026, 10, 18, 12)}
/>
</div>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | — | Names the field. |
value / defaultValue | string | null | — | An IANA zone, e.g. Europe/Paris. Controlled or not. |
onChange | (zone: string | null) => void | — | When a zone is chosen. |
timezones | string[] | every zone the runtime knows | The zones offered. |
now | number | when it appeared | UTC milliseconds the offsets and clocks are read at. |
hour12 / clearable / disabled | boolean | — | AM and PM, a button to remove the choice, read only. |
className | string | — | Extra classes. |