Skip to content

DateInput

The DateInput widget displays a native browser date picker. Its value is available as an ISO date string: YYYY-MM-DD.

import mercury as mr
date = mr.DateInput(
label="Select date",
value="2026-04-30"
)
date.value

type: string

Text displayed above the input. The default is "Date".

type: string

Initial date value in YYYY-MM-DD format.

type: string

Minimum allowed date in YYYY-MM-DD format.

type: string

Maximum allowed date in YYYY-MM-DD format.

type: string

URL query parameter name used to override the initial value.

type: "sidebar" | "inline" | "bottom"

Controls where the widget is rendered. The default is "sidebar".

type: bool

If True, the input is visible but cannot be edited.

type: bool

If True, the widget exists in app state but is not rendered.

type: string

Unique identifier used to distinguish widgets with identical arguments.