Products · Dash API

UI

Show an alert, or let the person pick a date or a time with the phone's own pickers.

dash.ui.alert

TypeScript
dash.ui.alert(options: AlertOptions, callOptions?: CallOptions): DashRequest<AlertResult>

Shows the phone's own alert. Resolves with the action the person chose.

Types: AlertOptions, AlertResult

dash.ui.pickDate

TypeScript
dash.ui.pickDate(options?: PickDateOptions, callOptions?: CallOptions): DashRequest<string>

Opens the phone's own calendar. Resolves with the chosen date, such as "2026-10-24", or rejects with cancelled if the person closes it.

Types: PickDateOptions

dash.ui.pickTime

TypeScript
dash.ui.pickTime(options?: PickTimeOptions, callOptions?: CallOptions): DashRequest<string>

Opens the phone's own clock. Resolves with the chosen time in 24 hours, such as "19:30", or rejects with cancelled if the person closes it.

Types: PickTimeOptions

Types

AlertAction

FieldTypeWhat it is
idstringWhat the alert resolves with, as action, when the person chooses this action.
labelstring
role (optional)'default' | 'cancel' | 'destructive'cancel closes the alert, and on Android, Back or a tap outside the alert chooses it too. Without a cancel action, the alert stays until the person picks one. destructive marks something that can't be undone.

AlertOptions

FieldTypeWhat it is
titlestring
message (optional)stringDash ends it with a line naming the dot, such as "From Plasas Kitchen".
actions (optional)AlertAction[]Default: one OK button. An empty list fails with invalid.

AlertResult

FieldTypeWhat it is
actionstringThe id of the action the person chose.

PickDateOptions

FieldTypeWhat it is
title (optional)string
value (optional)stringThe date chosen when the picker opens, such as "2026-10-24".
min (optional)stringThe earliest date the person can pick, such as "2026-10-01".
max (optional)stringThe latest date the person can pick, such as "2026-12-31".

PickTimeOptions

FieldTypeWhat it is
title (optional)string
value (optional)stringA time of day in 24 hours, such as "19:30", chosen when the picker opens.

Keep reading