⚡ ComponentForge

Date picker

Inputs

Text input plus grid calendar. Values are ISO yyyy-mm-dd strings over the wire; the grid implements the ARIA grid pattern with roving tabIndex and full arrow/PageUp/Home navigation.

import { DatePicker } from "@componentforge/react";

Examples

Weekends disabled

Disabled days are skipped by keyboard navigation but remain reachable — selection just rejects them.

value: (null)

Accessibility

  • Calendar is role="grid": rows/cells with aria-selected on the selected cell and aria-current="date" on today.
  • Month heading is aria-live="polite" so month jumps are announced.
  • Disabled days keep focus traversal intact (aria-disabled, not disabled) and reject selection.
  • Typed input validates strictly (2026-02-31 is rejected) and sets aria-invalid.

Keyboard interactions

KeyAction
← / → / ↑ / ↓Move focused day by 1 / 7 (skips disabled).
PageUp / PageDownPrevious / next month (Shift = year).
Home / EndFirst / last day of week.
Enter / SpaceSelect focused day.

API reference

Selected props — every component also spreads native HTML attributes.

PropTypeDefaultDescription
value / defaultValuestring | null (yyyy-mm-dd)nullISO date string contract.
min / maxstringInclusive ISO bounds.
isDateDisabled(date: Date) => booleanCustom predicate (weekends, booked days…).
localestring"en-US"Intl formatting for month/weekday labels.