Date Picker
Dropdown calendar for date selection, with single or multiple modes and day, month, or year granularity.
Basic
Label and sublabel
Description and help text
Use description for the rule above the field and help_text for the hint below it.
We will confirm by email within one business day.
Custom placeholder
Pre-selected value
Pass a Date, NaiveDateTime, DateTime, or ISO 8601 string.
Sizes
Disabled
Required selection
allow_deselect={false} prevents clearing the value once a date is chosen.
Clearable
Set clearable to render a reset button inside the field. It only appears once a value is present, and clearing dispatches a change event so phx-change bindings are notified. Works in every mode. Multiple selection clears every date.
Error state
Please pick a date in the future
Leading icon
Use :inner_prefix to place an icon inside the toggle border.
Outer prefix label
:outer_prefix renders content in an attached cell, sharing the field's border.
Outer suffix action
Pair the field with a button or other action through :outer_suffix.
Min and max
Constrain the selectable range. Calendar navigation buttons disable past the boundaries.
Weekdays only
Use the :weekends shortcut to disable Saturdays and Sundays.
Holiday calendar
Combine specific dates with recurring annual patterns. Disabled days are dimmed and struck through.
Recurring weekday pattern
Disable a specific weekday with {:weekday, n}, where 1 is Monday and 7 is Sunday.
US display format
European display format
Long display format
Multiple selection
Set multiple to toggle dates on and off. The toggle reads "X dates selected" once two or more are picked.
Multiple within a range
Combine multiple with min/max for fixed-window selection like a fiscal year.
Typeable input
Replaces the toggle with a text input. Separators are inserted automatically while typing.
Typeable with custom input format
Override the input mask with input_format. Any combination of dd, mm, and yyyy with a single-character separator is valid.