Date field

Outside the canon

From the pattern backlog (Date Picker), built for the filter panels and the report forms. Adapted from shadcn's calendar (react-day-picker): its DayPicker structure and classNames map, reshaped to the canon — our Icon instead of lucide, plain buttons instead of shadcn's Button, navy for the chosen day ("you have chosen this") and a mustard ring for today ("you are here right now"). DateField is the canon field as a trigger with the Calendar in a Popover; its value is an ISO yyyy-mm-dd string, so it drops into query params unchanged. The app keeps flatpickr, restyled to these tokens.

App: flatpickr controller / FilterDatePickerComponent (restyle)

Date field

#field

The canon field as a trigger; the Calendar opens in a Popover. Empty, filled and disabled, plus an error state.

Enabled by the Custom range

Enter a date on or after the issue date.

Calendar

#calendar

The panel on its own. Navy is the chosen day; today carries a mustard ring; outside days and disabled days drop to stone-300.

February 2026

Range

#range

mode="range": the ends are navy, the interior keeps a navy wash.

February 2026

Props

NameTypeDefaultNotes
valuestring—ISO yyyy-mm-dd, or "" when empty
onChange(value: string) => void—
placeholderstringSelect a date
disabledbooleanfalse
errorbooleanfalseField error styling; the message belongs to FormField
requiredbooleanfalseHides the clear button
Calendarreact-day-picker DayPicker props—mode single | range | multiple, selected, onSelect, disabled, defaultMonth…