A calendar engine, not a widget
Headless date logic with full keyboard and ARIA support. Four calendar systems and seven date adapters in about 5 KB gzipped.
Your markup
You write the markup. Compound hooks on a framework-agnostic core handle state, ARIA, and keyboard.
Four calendar systems
Gregorian, Islamic, Persian, and Hebrew are built in. Switch between them without rewriting your date UI.
Seven date adapters
Native Date, date-fns, dayjs, luxon, and more. Write your own against the adapter contract if none of them fit.
5 KB gzipped
A quarter of react-day-picker’s 20 KB. Zero dependencies, and the core ships nothing but the calendar.
Keyboard and ARIA
Arrow keys move focus, Home and End jump to the row edges, and PageUp and PageDown change the month. The grid has full ARIA semantics.
Single, range, or multi
One hook covers every selection mode. Switch between them with a single prop.
Install
Install the package, then pick a date adapter and a calendar system.
Install
bun add @gentleduck/calendarUse it
import { NativeAdapter, useCalendar } from '@gentleduck/calendar'
Free & open source
gentleduck is MIT licensed and will always be free and open source. Every package ships with full source access — fork it, modify it, own it.