react-datepicker

A fully customizable, accessible date and time picker component for React apps.

Library
npm
v9.1.0
8,383 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
57 /100 Fair
Development Activity 8
Maintenance 44
Community 76
Maturity 60
Momentum 40

Technical Analysis

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

react-datepicker is a widely used React component for selecting dates and date ranges, offering a drop-in <DatePicker /> that pairs a text input with a floating calendar popover. Built and maintained by HackerOne since 2014, it has grown into one of the standard choices for date input in the React ecosystem, with over 8,300 GitHub stars and more than 5 million weekly npm downloads.

The library ships fully typed with TypeScript, uses date-fns instead of moment.js for date manipulation (since v2), and covers a broad surface of date-picking scenarios out of the box: single dates, date ranges, multiple date selection, month/quarter/year pickers, time selection with configurable intervals, inline and portal rendering, keyboard navigation, and screen-reader-friendly ARIA markup. Positioning is handled by Floating UI, and locales are pluggable via date-fns’s internationalization data, making it straightforward to localize the calendar for a global user base.

What You Get

  • A drop-in <DatePicker /> component with a floating calendar popover positioned via Floating UI
  • Built-in support for single dates, date ranges, multiple dates, and month/quarter/year pickers
  • An integrated time picker with configurable intervals, mergeable into the same calendar
  • Locale support powered by date-fns, with registerLocale/setDefaultLocale helpers for i18n
  • Full TypeScript type definitions and ARIA-compliant keyboard navigation out of the box

Common Use Cases

  • Booking and reservation forms that need a constrained date range picker
  • Filtering dashboards or reports by a custom date range
  • Scheduling UIs that combine date and time selection in one control
  • Profile or checkout forms collecting a single birthdate or delivery date

Under The Hood

Architecture The root DatePicker component (src/index.tsx, ~2,000 lines, class-based) composes PopperComponent for positioning, which is wrapped by a withFloating higher-order component for Floating UI integration, an optional Portal for overflow rendering, and a TabLoop wrapper for keyboard focus trapping, which in turn renders the core Calendar component (src/calendar.tsx, ~1,300 lines) that composes Month, Year, Time, and dropdown subcomponents. Data flows top-down through props and callbacks, with DatePicker owning most controlled state (open/selected/preSelection) and delegating rendering to Calendar. Every component routes date manipulation through a single date_utils.ts module (~1,800 lines) that wraps date-fns, centralizing date math but making that file load-bearing for the whole component tree.

Tech Stack Written in TypeScript with strict and strictNullChecks enabled, targeting React 16 through 19 as peer dependencies. Positioning uses @floating-ui/react, className composition uses clsx, and all date math goes through date-fns v4 (replacing moment.js as of v2, per the README), with optional date-fns-tz for timezone conversion. The build pipeline uses Rollup with Babel and TypeScript plugins to emit UMD, CommonJS, and ES module bundles plus type declarations, and Sass compiles the stylesheets into both plain CSS and CSS Modules variants. A separate Vite-based docs site lives in docs-site/, linked to the main package via a Yarn portal dependency. CI runs on GitHub Actions with Node 24 and Yarn 4 via Corepack.

Code Quality The src/test/ directory holds 43 Jest test files covering calendar logic, dropdowns, exclusion/inclusion date filters, custom components, and portal rendering, using @testing-library/react and @testing-library/user-event, plus a dedicated axe.test.tsx that runs jest-axe for accessibility regressions. TypeScript strict mode is enforced project-wide, ESLint 9 with typescript-eslint and eslint-plugin-react-hooks enforces linting rules, Stylelint covers the SCSS stylesheets, and Prettier plus Husky/lint-staged enforce formatting on every commit. CI runs the full suite alongside CodeQL static analysis, making this one of the more rigorously tested and typed packages of its kind.

API Design The public surface is a single <DatePicker /> component with an extensive, well-documented prop set (see docs/datepicker.md) covering single/range/multi-date modes, time selection, locale registration, and render props (renderCustomHeader, renderDayContents) that allow full UI takeover without forking the component. Getting started requires minimal boilerplate — import the component and its stylesheet, pass selected/onChange — though the breadth of the prop surface means combining advanced modes (range plus time plus custom headers) carries a real learning curve. Naming is consistent throughout (onChange, onSelect, minDate/maxDate, excludeDates), and every prop is documented individually.

Used by 12 apps in this directory

Go
85%
Apache 2.0

Argo Workflows

Data Engineering · Devops

16,978

The most popular Kubernetes-native workflow engine for orchestrating containerized DAGs, ML pipelines, CI/CD, and parallel batch jobs at scale.

View details
96
Repo Health
90
Technical
67
Dependency
Built with
Go 85%
TypeScript 11%
Updated 1 weeks ago
TypeScript
53%
Other

Chaskiq

CRM · Customer Support

3,569

Self-hosted live chat, video calls, help center, and marketing automation — a full-stack Intercom alternative you run on your own infrastructure.

View details
58
Repo Health
66
Technical
66
Dependency
Built with
TypeScript 53%
Ruby 36%
Updated 2 months ago
Python
63%
BSD 3

Flagsmith

Ab Testing Experimentation · Developer Tools · Devops

6,550

Open-source feature flagging, remote config, and A/B/multivariate testing platform for web, mobile, and server-side apps — self-host or use the hosted SaaS.

View details
91
Repo Health
82
Technical
63
Dependency
Built with
Python 63%
TypeScript 32%
Updated 1 weeks ago
TypeScript
62%
Other

Flowise

AI Development · Automation · Developer Tools

55,459

Drag-and-drop visual builder for AI agents, RAG pipelines, and multi-agent systems—deploy anywhere in minutes.

View details
86
Repo Health
77
Technical
63
Dependency
Built with
TypeScript 62%
JavaScript 27%
Updated 1 months ago
Python
64%
Other

Keep

Automation · Devops · Monitoring

12,313

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
90
Repo Health
79
Technical
66
Dependency
Built with
Python 64%
TypeScript 36%
Updated 1 weeks ago
TypeScript
38%
Apache 2.0

Label Studio

AI Development · Data Engineering

28,264

Label Studio is an open-source, multi-type data labeling platform that lets teams annotate images, text, audio, video, and time series data with a configurable XML-based UI and export annotations in formats ready for any ML framework.

View details
93
Repo Health
87
Technical
67
Dependency
Built with
TypeScript 38%
JavaScript 27%
Python 25%
Updated 1 weeks ago
TypeScript
80%
Apache 2.0

nao

AI Development · Analytics

1,651

Build and deploy an open-source analytics agent that understands your data warehouse and answers business questions in plain English.

View details
84
Repo Health
76
Technical
67
Dependency
Built with
TypeScript 80%
Python 19%
Updated 1 weeks ago
JavaScript
92%
Other

OpenSign

Digital Signiture

6,992

Self-host a full-featured DocuSign alternative with unlimited e-signatures, multi-signer workflows, and cryptographic PDF signing.

View details
81
Repo Health
61
Technical
70
Dependency
Built with
JavaScript 92%
Updated 1 months ago
Elixir
58%
Other

Operately

AI Assistants · Collaboration · Productivity

552

The open source company operating system that unifies OKRs, projects, and team execution with built-in accountability cadences.

View details
86
Repo Health
80
Technical
73
Dependency
Built with
Elixir 58%
TypeScript 41%
Updated 1 weeks 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