react-day-picker

A lightweight, fully customizable date picker component for React applications.

Library
npm
v10.0.1
6,854 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
69 /100 Good
Development Activity 48
Maintenance 56
Community 72
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
87 /100 Excellent
Architecture 85
Code Quality 88
Innovation 84
Learning Curve 90

react-day-picker is a React component for building date pickers, calendars, and date inputs. It renders an accessible, headless-friendly calendar grid that supports single, multiple, and range selection modes, along with custom selection logic for more advanced cases. Styling is left entirely to the consumer, whether through plain CSS, CSS Modules, or a utility framework like Tailwind, which is why it underpins the calendar primitives shipped in popular component systems such as shadcn/ui.

The library handles the harder parts of date UI internally: locale-aware formatting and translation via date-fns, ISO 8601 and broadcast week calendars, time zone conversion through @date-fns/tz, and WCAG 2.1 AA keyboard/screen-reader accessibility. Companion @daypicker/* packages extend it with Persian, Hijri, Buddhist, Ethiopic, and Hebrew calendar systems, and every rendered element (day, caption, navigation button, dropdown) can be swapped out with a custom component.

What You Get

  • A DayPicker component supporting single, multiple, range, and fully custom selection modes
  • Built-in localization and formatting powered by date-fns, including 90+ locale files
  • Time zone-aware date handling via the companion @date-fns/tz package
  • Support for ISO 8601, broadcast, and (via add-on packages) Persian, Hijri, Buddhist, Ethiopic, and Hebrew calendar systems
  • Per-element component overrides (day cells, captions, navigation, dropdowns) for deep visual customization
  • WCAG 2.1 AA-compliant keyboard navigation and screen-reader labeling out of the box

Common Use Cases

  • Adding a date field or range picker to a booking, scheduling, or reservation form
  • Building a custom calendar UI inside a design system, such as the shadcn/ui calendar primitive
  • Filtering dashboards or reports by a selected date or date range
  • Collecting birthdates, deadlines, or event dates with locale-appropriate formatting
  • Building multi-calendar-system date inputs for internationalized products

Under The Hood

Architecture

DayPicker.tsx (packages/react-day-picker/src) is the root component; it composes a DateLib abstraction over date-fns, a useCalendar/useSelection/useFocus hook trio for state, and a getComponents/UI.ts registry so every rendered node (Day, Month, Nav, Dropdown, etc.) is independently overridable, with noonDateLib.ts normalizing dates to noon to avoid DST edge cases.

Tech Stack

TypeScript throughout with strict mode and noUnusedLocals enabled (tsconfig-base.json), date-fns ^4.1.0 and @date-fns/tz ^1.4.1 as the only runtime dependencies, react as a peer dependency (>=16.8.0), built to dual CJS/ESM output via tsc, managed as a pnpm workspace with Changesets for release versioning.

Code Quality

64 test files are colocated under src/ (e.g. DayPicker.test.tsx, useDayPicker.test.tsx, useAnimation.test.tsx, locale.test.ts) and run via Jest with @testing-library/jest-dom custom matchers, plus 111 standalone runnable examples under examples/ that double as integration tests and snapshots; naming is consistent (getX/useX/createX helper conventions) and modules stay small and single-purpose.

API Design

The public API centers on a single DayPicker component with a discriminated mode prop (single/multiple/range/custom) for type-safe selection handling, sensible defaults that let a minimal example render in about six lines, and an extensive docs site (daypicker.dev, sourced from apps/website/docs) covering customization, styling, localization, time zones, and accessibility guides.

Used by 96 apps in this directory

Python
70%
AGPL 3.0

Tracecat

AI Agents · Automation · Security

3,816

Open-source agentic security automation platform that runs AI agents and durable workflows at scale with sandboxed execution.

View details
89
Repo Health
88
Technical
66
Dependency
Built with
Python 70%
TypeScript 28%
Updated 6 days ago
TypeScript
99%
Apache 2.0

Trigger.dev

AI Development · Automation · Developer Tools

16,427

Build and deploy fully-managed AI agents and background jobs in TypeScript — with no timeouts, durable retries, real-time observability, and elastic scaling built in.

View details
89
Repo Health
9
Technical
63
Dependency
Built with
TypeScript 99%
Updated 1 weeks ago
Go
58%
AGPL 3.0

Unkey

Developer Tools

5,450

An open-source developer platform for API infrastructure — issue and verify API keys, enforce global rate limits, route traffic through a gateway, and get per-key analytics and audit logs.

View details
91
Repo Health
70
Technical
68
Dependency
Built with
Go 58%
TypeScript 41%
Updated 6 days ago
TypeScript
90%
AGPL 3.0

useSend

Developer Tools · Marketing

4,698

Self-hostable open source email platform built on Amazon SES with a full dashboard, SMTP relay, REST API, and multi-language SDKs.

View details
78
Repo Health
72
Technical
68
Dependency
Built with
TypeScript 90%
Updated 3 weeks ago
Python
73%
Apache 2.0

Unsloth

AI Assistants · AI Development

76,886

Run and fine-tune LLMs, diffusion, audio and embedding models on your own hardware, from a native desktop app, a browser UI, or a Python library.

View details
89
Repo Health
83
Technical
70
Dependency
Built with
Python 73%
TypeScript 21%
Updated 5 days ago
TypeScript
85%
Other

Webiny JS

Blogging · CMS · Ecommerce

8,048

Open-source, self-hosted CMS on AWS serverless — a TypeScript framework you extend with code, not a product you configure through a UI.

View details
90
Repo Health
86
Technical
62
Dependency
Built with
TypeScript 85%
JavaScript 13%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers