Efniv0.1

Components

Calendar

Standalone month calendar built on react-day-picker. Use it inline for scheduling views, or wrap it in a Popover for a compact Date picker.

When to usewhen the operator needs to see multiple days at once — scheduling, range selection, availability.

Import

import { Calendar } from "@ravnhq/efni/calendar"

Single date

October 2026
const [date, setDate] = useState<Date | undefined>(new Date())

<Calendar mode="single" selected={date} onSelect={setDate} />

Range

October 2026
November 2026
const [range, setRange] = useState<DateRange | undefined>()

<Calendar mode="range" selected={range} onSelect={setRange} numberOfMonths={2} />

Accessibility

KeyAction
ArrowsMove focus between days.
PageUp / PageDownPrevious / next month (Shift adds a year).
Home / EndJump to start or end of the week.
Enter / SpaceSelect the focused day.
  • react-day-picker renders as a native table with role="grid" and matching cell semantics.
  • Give the calendar an aria-label when it isn't paired with a visible heading.

Guidelines

Do
  • Show two months side by side when picking a range.
  • Default the selected date to today for scheduling flows.
  • Wrap in Popover for compact date inputs; use inline for scheduling boards.
Don't
  • Don't hide the current month indicator — operators lose orientation.
  • Don't use a calendar when the field only expects a known date format — an Input is faster to type.
  • Don't animate the month change; it slows down repeat scrubbing.

Props

PropTypeDefaultDescription
mode"single" | "multiple" | "range"—Enable the selection of a single day, multiple days, or a range of days.
numberOfMonthsnumber—The number of displayed months.
buttonVariantReact.ComponentProps<typeof Button>["variant"]"ghost"Button variant used for the day cells and the month navigation.
…propsReact.ComponentProps<typeof DayPicker>—Everything Calendar passes to the element it renders.
selectedDate | Date[] | DateRange | undefined—Currently selected value(s). Shape matches mode.
onSelect(value) => void—Fires whenever the selection changes.