DateRange
The DateRange widget displays two native browser date inputs: start and end.
Its value is available as a list of ISO date strings: ["YYYY-MM-DD", "YYYY-MM-DD"].
import mercury as mr
date_range = mr.DateRange( label="Select date range", value=("2026-04-01", "2026-04-30"))
date_range.valueDateRange Props
Section titled “DateRange Props”type: string
Text displayed above the inputs. The default is "Date range".
type: tuple[str, str] | list[str] | None
Initial start and end dates in YYYY-MM-DD format.
type: string
Minimum allowed date for both inputs.
type: string
Maximum allowed date for both inputs.
start_url_key
Section titled “start_url_key”type: string
URL query parameter name used to override the start date.
end_url_key
Section titled “end_url_key”type: string
URL query parameter name used to override the end date.
position
Section titled “position”type: "sidebar" | "inline" | "bottom"
Controls where the widget is rendered. The default is "sidebar".
disabled
Section titled “disabled”type: bool
If True, both inputs are visible but cannot be edited.
hidden
Section titled “hidden”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.