DateTimeInput
The DateTimeInput widget displays a native browser date-and-time picker.
Its value is available as YYYY-MM-DD HH:MM or YYYY-MM-DD HH:MM:SS.
import mercury as mr
dt = mr.DateTimeInput( label="Select date and time", value="2026-04-30 14:30")
dt.valueDateTimeInput Props
Section titled “DateTimeInput Props”type: string
Text displayed above the input. The default is "Date and time".
type: string
Initial datetime value in YYYY-MM-DD HH:MM or YYYY-MM-DD HH:MM:SS format.
type: string
Minimum allowed datetime.
type: string
Maximum allowed datetime.
type: int
Input step in seconds. The default is 60.
url_key
Section titled “url_key”type: string
URL query parameter name used to override the initial value.
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, the input is 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.