Date Picker

A date picker that combines a trigger button with a Calendar in a floating dropdown.

Single Date

Click the button to open a calendar. Select a date to populate the field.

Date Range

Select a start and end date. Shows two months side by side.

Pre-selected Date

A date picker with a date already selected.

Usage

julia
using Suite

# Simple date picker
DatePicker()

# Range picker with two months
DatePicker(mode="range", number_of_months=2, placeholder="Select dates")

# Pre-selected date
DatePicker(selected="2026-02-14")

# Custom placeholder
DatePicker(placeholder="Choose a birthday")

# Disabled dates
DatePicker(disabled_dates="2026-02-14,2026-02-15")

Composition

DatePicker is a composition of a trigger button with a Calendar inside a floating dropdown. For more control, you can compose these yourself using Popover + Calendar.

julia
# Manual composition with Popover + Calendar
Popover(
    PopoverTrigger(Button(variant="outline", "Pick a date")),
    PopoverContent(class="w-auto p-0",
        Calendar(mode="single")
    )
)

Keyboard Interactions

KeyAction
Space / EnterOpen calendar (on trigger button)
EscapeClose calendar and return focus to trigger
Arrow keysNavigate days in the calendar grid
PageUp / PageDownNavigate months
Space / EnterSelect focused date (in calendar)

API Reference

PropTypeDefaultDescription
modeString"single"Selection mode: single, multiple, or range
monthIntcurrent monthInitial displayed month (1-12)
yearIntcurrent yearInitial displayed year
selectedString""Pre-selected date(s), comma-separated ISO strings
placeholderString"Pick a date"Trigger button text when no date selected
disabled_datesString""Disabled dates, comma-separated ISO strings
show_outside_daysBooltrueShow days from adjacent months
number_of_monthsInt1Number of months to display
classString""Additional CSS classes for the trigger button
themeSymbol:defaultTheme preset