A date and a time chosen in one panel: a calendar with a list of times beside it or, for a range, two months side by side with a start and an end time.
<.datetime_picker field={@form[:starts_at]} label="Starts at" />
<.datetime_picker name="meeting" interval={15} min="now" min_time="08:00" max_time="18:00" />
<.datetime_picker name="slot" time="input" unavailable="12:00-13:00, 2026-10-14, 2026-10-15T10:00" />
<.datetime_picker name="shift" mode="range" default_time="09:00/17:00" locale="pt_BR" />The value is wall-clock text like a native datetime-local input (2026-10-14T10:30, no time
zone, no conversion), sent through a hidden input named like the field (a range sends name[]
with an empty first one, or two fields with start_field/end_field or
start_name/end_name). A bubbling input event fires on every change.
The behaviour lives in the LedgerUI.DatetimePicker hook
(priv/static/ledger_ui/hooks/datetime_picker.js). datetime_picker_panel/1 renders just the
static panel surface.
Summary
Functions
Same as datetime_picker/1 (same attributes and slots), under the name the design vitrine uses.
Renders the date and time input with its panel.
The static panel: a calendar with the list of times beside it.
Functions
Same as datetime_picker/1 (same attributes and slots), under the name the design vitrine uses.
Attributes
id(:string) - Defaults tonil.name(:string) - Defaults tonil.value(:any)field(Phoenix.HTML.FormField) - Defaults tonil.label(:string) - Defaults tonil.help(:string) - Defaults tonil.timezone(:string) - Defaults tonil.errors(:list) - Defaults to[].placeholder(:string) - Defaults tonil.mode(:string) - Defaults to"single". Must be one of"single", or"range".start_field(Phoenix.HTML.FormField) - Defaults tonil.end_field(Phoenix.HTML.FormField) - Defaults tonil.start_name(:string) - Defaults tonil.end_name(:string) - Defaults tonil.interval(:integer) - Defaults to30.time(:string) - Defaults to"list". Must be one of"list", or"input".default_time(:string) - Defaults tonil.time_format(:string) - Defaults to"auto". Must be one of"auto","12", or"24".time_24hr(:boolean) - Defaults tonil.minute_step(:integer) - Defaults tonil.default_hour(:integer) - Defaults tonil.locale(:string) - Defaults to"en". Must be one of"en", or"pt_BR".display_format(:string) - Defaults tonil.range_separator(:string) - Defaults to" – ".min(:any) - Defaults tonil.max(:any) - Defaults tonil.min_time(:string) - Defaults tonil.max_time(:string) - Defaults tonil.unavailable(:any) - Defaults to[].week_start(:integer) - Defaults to0.months(:list) - Defaults tonil.weekdays(:list) - Defaults tonil.today(:any) - Defaults tonil.labels(:map) - Defaults to%{}.layout(:string) - Defaults to"auto". Must be one of"auto", or"compact".variant(:string) - Defaults to"outlined". Must be one of"outlined", or"filled".split(:boolean) - Defaults tofalse.date_label(:string) - Defaults tonil.time_label(:string) - Defaults tonil.size(:string) - Defaults to"md". Must be one of"sm","md", or"lg".placement(:string) - Defaults to"bottom-start". Must be one of"top","bottom","left","right","top-start","top-end","bottom-start","bottom-end","left-start","left-end","right-start", or"right-end".show_icon(:boolean) - Defaults totrue.disabled(:boolean) - Defaults tofalse.on_change(:string) - Defaults tonil.target(:any) - Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
icon- Replaces the calendar icon.trigger- Replaces the input: any button inside opens the panel.
Renders the date and time input with its panel.
Attributes
id(:string) - Defaults tonil.name(:string) - Defaults tonil.value(:any)field(Phoenix.HTML.FormField) - Defaults tonil.label(:string) - Defaults tonil.help(:string) - Defaults tonil.timezone(:string) - Defaults tonil.errors(:list) - Defaults to[].placeholder(:string) - Defaults tonil.mode(:string) - Defaults to"single". Must be one of"single", or"range".start_field(Phoenix.HTML.FormField) - Defaults tonil.end_field(Phoenix.HTML.FormField) - Defaults tonil.start_name(:string) - Defaults tonil.end_name(:string) - Defaults tonil.interval(:integer) - Defaults to30.time(:string) - Defaults to"list". Must be one of"list", or"input".default_time(:string) - Defaults tonil.time_format(:string) - Defaults to"auto". Must be one of"auto","12", or"24".time_24hr(:boolean) - Defaults tonil.minute_step(:integer) - Defaults tonil.default_hour(:integer) - Defaults tonil.locale(:string) - Defaults to"en". Must be one of"en", or"pt_BR".display_format(:string) - Defaults tonil.range_separator(:string) - Defaults to" – ".min(:any) - Defaults tonil.max(:any) - Defaults tonil.min_time(:string) - Defaults tonil.max_time(:string) - Defaults tonil.unavailable(:any) - Defaults to[].week_start(:integer) - Defaults to0.months(:list) - Defaults tonil.weekdays(:list) - Defaults tonil.today(:any) - Defaults tonil.labels(:map) - Defaults to%{}.layout(:string) - Defaults to"auto". Must be one of"auto", or"compact".variant(:string) - Defaults to"outlined". Must be one of"outlined", or"filled".split(:boolean) - Defaults tofalse.date_label(:string) - Defaults tonil.time_label(:string) - Defaults tonil.size(:string) - Defaults to"md". Must be one of"sm","md", or"lg".placement(:string) - Defaults to"bottom-start". Must be one of"top","bottom","left","right","top-start","top-end","bottom-start","bottom-end","left-start","left-end","right-start", or"right-end".show_icon(:boolean) - Defaults totrue.disabled(:boolean) - Defaults tofalse.on_change(:string) - Defaults tonil.target(:any) - Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
icon- Replaces the calendar icon.trigger- Replaces the input: any button inside opens the panel.
The static panel: a calendar with the list of times beside it.
Attributes
month(:any) - Defaults tonil.selected(:any) - Defaults tonil.today(:any) - Defaults tonil.week_start(:integer) - Defaults to0.locale(:string) - Defaults to"en".times(:list) - The"HH:MM"texts of the time buttons. Defaults to[].time(:string) - The chosen"HH:MM". Defaults tonil.timezone(:string) - A time zone caption over the list of times. Defaults tonil.class(:any) - Defaults tonil.- Global attributes are accepted.