Skip to content
Block Kit for React
Esc
↑↓navigate↵open⌘Jpreview
On this page

Time picker

A dropdown list for choosing a time of day, rendered like Slack's timepicker.

timepicker opens a scrollable list of times in 30-minute increments. Use it in an actions block or a section’s accessory for a quick pick, or in an input block to collect a time in a modal.

Your AppAPP
onActionInteract with the preview.

Fields

PropType
typestring

Always `timepicker`.

Typestring
action_id?string

Identifies this element in the `block_actions` payload. Must be unique within a block.

Typestring
initial_time?string

The time selected when the element loads, as 24-hour `HH:mm`, e.g. `22:25` for 10:25pm.

Typestring
timezone?string

An IANA time zone, e.g. `America/Chicago`. Shown as hint text under the control and passed back on interaction.

Typestring
placeholder?PlainTextElement

Text shown when no time is selected. Slack limits it to 150 characters.

TypePlainTextElement
confirm?ConfirmationDialog

A confirmation dialog shown before the pick takes effect.

TypeConfirmationDialog
focus_on_load?boolean

Focuses this element when its modal or Home tab loads. Only one element per view. Slack ignores it in messages.

Typeboolean
Defaultfalse

Examples

Without an initial value

Your AppAPP
onActionInteract with the preview.

The closed control shows the placeholder text, or “Select time” if none is given, until a time is picked. Then it reads e.g. “1:37 PM”.

With an initial value

Your AppAPP
onActionInteract with the preview.

Inside an input block

Your AppAPP
Label

With a time zone

Setting timezone shows a hint underneath the control naming it:

Your AppAPP
Timezone: America/Los_Angeles
onActionInteract with the preview.

timezone is a display hint only: it labels the picker but doesn’t shift initial_time or the options list, which are always plain HH:mm wall-clock values. It’s unrelated to the timeZone prop on BlockKitProvider, which controls how other elements (like datetimepicker) format their values for display.

With a confirmation dialog

Your AppAPP
onActionInteract with the preview.

Interactivity

Picking an option fires an action with selected_time:

{
  "type": "timepicker",
  "action_id": "select_time",
  "block_id": "meeting",
  "selected_time": "14:30"
}

The same shape lands in state.values[block_id][action_id]:

{
  "type": "timepicker",
  "selected_time": "14:30"
}

When initial_time is set, that value is reported as state as soon as the element mounts, before any interaction.

Was this page helpful?