Date Range Picker
Dropdown calendar for picking a start and end date, with presets and granularity options.
Basic
Label and sublabel
Description and help text
Use description for the rule above the field and help_text for the hint below it.
Check-in is after 3pm; check-out before 11am.
Pre-selected range
Pass start_value and end_value as Date, NaiveDateTime, DateTime, or ISO 8601 strings.
Sizes
Disabled
Required range
allow_deselect={false} keeps an existing range from being cleared by clicking its start.
Clearable
Set clearable to render a reset button inside the field. Both endpoints reset together, and clearing dispatches a change event so phx-change bindings are notified.
Error state
End date must be after the start date
Leading icon
Use :inner_prefix to render an icon inside the field's border.
Outer prefix label
:outer_prefix renders an attached cell that shares the field's border.
Min and max
Constrain the selectable window. Calendar navigation disables past the boundaries.
Weekdays only
Use the :weekends shortcut to skip Saturdays and Sundays.
Holiday calendar
Combine specific dates with recurring annual patterns. Disabled days are dimmed and struck through.
Display format
Both endpoints share the same strftime pattern in the toggle.
Month granularity
Set granularity="month" for a 3-column month grid. Endpoints normalize to the first of the month.
Extended navigation
Adds previous/next year arrows alongside the month arrows for ranges that span years.
Multi-month layout
months (1..4) renders calendar grids side-by-side. The visible count adapts to the viewport.
Select navigation
navigation="select" adds month and year dropdowns beside the arrows for jumping across years.
Week starts on Monday
Shifts the first column of the day grid. Defaults to Sunday; set to 1 for ISO 8601.
Confirm mode
close="confirm" shows Cancel and Apply buttons; the range commits only on Apply.
Range presets
Render a sidebar of one-click range shortcuts. Each preset is a three-tuple {label, start, end}.
Spanish locale
locale translates weekday and month names. Translate your own labels separately, for example via Gettext.
German locale
German pulls in dd.mm.yyyy formatting and a Monday week start automatically.
Form integration
Changes: %{}