Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

TimezonePicker

The TimezonePicker component combines Payload's translated timezone label with a compact ReactSelect input. Supply the timezones that are valid for the current feature or project.

Import

1
import { TimezonePicker } from '@payloadcms/ui'

Basic usage

Loading component example…

Store an IANA timezone identifier such as America/Detroit rather than a fixed UTC offset so daylight-saving changes can be handled correctly.

Inside the Admin Panel, Payload provides the translation context used by the label. Rendering the picker outside the Admin Panel requires the same UI providers.

Common props

These are the props most commonly used with this component. See its exported types in @payloadcms/ui for the complete list.

Prop

Type

Default

Description

id *

string

Identifies the underlying select input.

options *

SelectFieldClient['options']

Timezones displayed in the select menu.

selectedTimezone

string

Value of the currently selected timezone.

onChange

(timezone: string) => void

Runs when the selected timezone changes.

required

boolean

false

Marks the picker as required and prevents clear.

readOnly

boolean

false

Prevents the timezone from being changed.

* An asterisk denotes that a prop is required.

Was this page helpful?

Next

Tooltip