Date field
Outside the canonFrom 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
#fieldThe 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
#calendarThe panel on its own. Navy is the chosen day; today carries a mustard ring; outside days and disabled days drop to stone-300.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Range
#rangemode="range": the ends are navy, the interior keeps a navy wash.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
Props
| Name | Type | Default | Notes |
|---|---|---|---|
| value | string | — | ISO yyyy-mm-dd, or "" when empty |
| onChange | (value: string) => void | — | |
| placeholder | string | Select a date | |
| disabled | boolean | false | |
| error | boolean | false | Field error styling; the message belongs to FormField |
| required | boolean | false | Hides the clear button |
| Calendar | react-day-picker DayPicker props | — | mode single | range | multiple, selected, onSelect, disabled, defaultMonth… |