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
Basic usage
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 |
|---|---|---|---|
| | — | Identifies the underlying select input. |
| | — | Timezones displayed in the select menu. |
| | — | Value of the currently selected timezone. |
| | — | Runs when the selected timezone changes. |
| | | Marks the picker as required and prevents clear. |
| | | Prevents the timezone from being changed. |
* An asterisk denotes that a prop is required.
Was this page helpful?