DATES
DatePicker
A date trigger opening a Calendar in a Popover, closing as soon as you pick a day.
PREVIEW
Cannot be in the past.
Not clearable, and no date is set yet.
due = 2026-09-19 · start = null
SOURCE
import { DatePicker, Field } from '@objectifthunes/whiteboard'
<Field label="Due date" hint="Cannot be in the past.">
<DatePicker value={due} onChange={setDue} min={new Date()} fullWidth />
</Field>NOTES
Deliberately not a text input. Typed dates need parsing, locale guessing and error states for a job the grid already does unambiguously. When free typing genuinely matters — a birth year, a date far from today — use an Input with type="date" and skip this.
Closes as soon as you pick a day, since there is nothing left to decide. onChange receives a local-midnight Date, or null when cleared, so the field can genuinely be empty rather than defaulting to today.
The popover flips above the trigger when there is no room below, which matters in a long form where the field sits near the bottom of the viewport.