Skip to content
Forms

Calendar

A month grid for picking a date or a range.

import { Calendar } from "@flinbu/seed";

Single, Sundays disabled

November 2026
MTWTFSS
import { Calendar } from "@flinbu/seed";

  const [d, setD] = React.useState<Date | null>(new Date());
  return <Calendar value={d} onValueChange={setD} isDateDisabled={(x) => x.getDay() === 0} />;

Range over two months

Hovering previews the range before the second click.

November 2026
MTWTFSS
December 2026
MTWTFSS
import { Calendar } from "@flinbu/seed";

  const t = new Date();
  const [r, setR] = React.useState<DateRange | null>({ from: new Date(t.getFullYear(), t.getMonth(), 3), to: new Date(t.getFullYear(), t.getMonth(), 9) });
  return <Calendar mode="range" months={2} value={r} onValueChange={setR} />;

Use it for

  • Inline on a page; DatePicker puts it in a popover.

Props

PropTypeDefaultDescription
mode'single''range''single'Range values are { from, to }.
value / defaultValueDateDateRangenull–Selection.
onValueChange(value) => void–Called on pick.
months121Months side by side.
min / maxDate–Limits.
isDateDisabled(date: Date) => boolean–Unavailable days.
weekStartsOnnumber10 Sunday to 6 Saturday.
localestring–Month and day names.

Accessibility

  • A grid per month: arrows move by day and week, Page Up and Down by month, Home and End to the week's edges; only the focused day is in the tab order.
  • Today has aria-current=date; disabled days are struck through.