React-Date-Picker: Custom Date Selection for React
A date picker for your React app.
At a glance
- What is it?
- React-Date-Picker gives React applications a composable date picker built on React-Calendar. It supports day, month, year, and decade selection, but its modern-browser requirement and styling work make it more suitable than a native date input for applications that need custom behavior.
- Who is it for?
- Adopt React-Date-Picker when a React application needs calendar-driven date entry, selection granularity beyond a native date field, or direct access to React-Calendar through calendarProps. Do not add it for a straightforward modern mobile form or when legacy browser support is mandatory, since the README recommends native date input for those cases.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly TypeScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
Why React-Date-Picker Exists Beyond a Native Date Field
React-Date-Picker addresses React applications that need an on-screen calendar while retaining an input field for date entry. The component displays custom inputs, a native input, and a calendar, so a developer can control the presentation without designing date selection UI from scratch. Its selection model is broader than the everyday day picker: the README lists days, months, years, and decades. It also states that the package supports virtually any language and does not require moment.js.
The intended audience is developers building a React interface in TypeScript or JavaScript who need more than the browser's default date field. React 16.3 or later is required. The compatibility table distinguishes older React lines: React 16.3 through 16.7 uses the 8.x line, React 16.0 through 16.7 uses 7.x according to the table grouping, and React 16.8 or later can use the latest release. That version boundary matters when integrating the component into an established application.
This is not a general scheduling library. React-Time-Picker and React-DateTime-Picker are separate projects for those requirements. React-Date-Picker is specifically the date selection component, although it can be composed with those projects.
The React-Calendar Data Flow Inside the Date Picker
Based on the repository layout and README, React-Date-Picker is the published package under `packages/`, while the root `package.json` defines a Yarn workspace named `react-date-picker`. Its calendar layer depends heavily on React-Calendar. The public `DatePicker` component combines date inputs and the calendar, and `calendarProps` accepts props passed to the underlying React-Calendar component.
The documented basic example uses controlled React state. A `Date` or `null` is accepted as one value piece, while the declared `Value` type also permits a two-item tuple of those pieces. The application initializes state with `new Date()`, passes that state through `value`, and passes the state setter through `onChange`. When the user selects or edits a date, React-Date-Picker calls `onChange`; the owning application then updates its state and sends the new value back through `value`.
That architecture leaves date ownership in the application rather than inside an opaque component state. It also means callers must understand the accepted value shapes before using ranges or nullable values. The README excerpt does not document the complete range constraints or the detailed output representation of `onChange`, so those points require checking the full prop documentation before building range-dependent behavior.
The component also renders a native input according to the README. That does not turn the package into a wrapper around only `<input type="date" />`. Its main value is the added calendar interface and React-level customization.
Installing and Connecting React-Date-Picker
Install the published package with either npm or Yarn. The README gives both package-manager commands, and either one adds `react-date-picker` to the consuming application.
npm install react-date-pickerFor a Yarn project, use the alternative command documented by the project:
yarn add react-date-pickerThe default import name is `DatePicker`. This first example initializes controlled state, renders the component, and wires the state setter directly to `onChange`.
import { useState } from 'react';
import DatePicker from 'react-date-picker';
type ValuePiece = Date | null;
type Value = ValuePiece | [ValuePiece, ValuePiece];
function MyApp() {
const [value, onChange] = useState<Value>(new Date());
return <DatePicker onChange={onChange} value={value} />;
}The source application supplies the current value. The picker does not receive an initial date through a special initialization prop in this example. Importing the default styles requires the two CSS files named in the README:
import 'react-date-picker/dist/DatePicker.css';
import 'react-calendar/dist/Calendar.css';The first stylesheet provides React-Date-Picker's default presentation. The second imports React-Calendar's styles, which are needed because the picker relies on that calendar component.
Localization, Accessibility, and Calendar Customization Boundaries
The README says the package supports virtually any language, but the available excerpt does not identify the locale prop, its accepted locale identifiers, or a complete localization setup. Applications should therefore verify the documented interface instead of assuming a particular date library or locale configuration. The explicit absence of a moment.js requirement is useful because it avoids choosing a large date framework merely to render a calendar.
Accessibility is part of the design rather than an optional afterthought. `calendarAriaLabel` sets the `aria-label` on the calendar button, and the native alternative in the README also uses `aria-label="Date"`. The `autoFocus` prop can focus the input after mounting. These controls show that labels and focus behavior are exposed through the component API, although the excerpt does not provide a complete keyboard-navigation guide.
The `calendarIcon` prop accepts a string, a React element, or a React function. Passing `null` explicitly hides the icon. Applications can also provide `className`, which is added to the main `react-date-picker` element, and pass calendar configuration through `calendarProps`.
The styling route matters. The repository includes a `sample/` directory with a Vite TypeScript application and its own stylesheet, but the sample contents do not establish a complete theming recipe. The documented entry points are the two CSS files above. Teams that need deeply customized visuals may have to replace or override those rules rather than rely on a utility-class API, which the README does not describe.
Where React-Date-Picker Is the Wrong Choice
The clearest wrong-tool case is a simple modern form that does not need the package's advanced calendar features. The README directly recommends native date input when legacy-browser support is unnecessary and advanced behavior is not required. It gives this reason for preferring the browser control: native input is described as more accessible, adds no extra bundle weight, and works better on mobile devices.
<input aria-label="Date" type="date" />That recommendation is especially relevant for progressive forms on current mobile browsers. Adding a JavaScript calendar can introduce presentation and bundle costs when the application only needs one date value. The package itself should not be treated as automatically better than the platform control.
Legacy support is the opposite boundary. React-Calendar uses modern web technologies, and the README links its browser-support dependency to modern-browser internationalization features. Applications that must support older browsers should not assume React-Date-Picker fits their browser matrix. Teams in that position need to evaluate the native control, an older compatible React-Date-Picker line, or another solution, although the README does not prescribe a particular legacy component.
The project is also the wrong scope for time-only or combined date-and-time entry. The documentation directs those needs to React-Time-Picker and React-DateTime-Picker rather than expecting this package to absorb both concerns.
Native Input Versus a Controlled React Calendar
The native alternative and React-Date-Picker make different architectural choices. A native date input delegates date entry, rendering, and mobile interaction to the browser. It adds no JavaScript bundle for the picker itself, but its interface and extension points are controlled by the platform. React-Date-Picker adds a React component, React-Calendar behavior, locale-facing functionality, and custom CSS files, while exposing selection granularity and calendar customization through props.
React-Date-Picker is the more specific option when an application wants a calendar as part of its interface and needs React-level styling or calendar props. Native date input is the more conservative option for a basic form with a current browser baseline. The package's own README supports that distinction rather than claiming superiority in every case.
There is also a state-management difference. The documented React example explicitly stores the value with `useState` and connects both `value` and `onChange`. A native input would also commonly be controlled in React, but this README excerpt does not prescribe a particular implementation for that element. The important project-specific point is that React-Date-Picker's calendar behavior is exposed as a React component and backed by React-Calendar.
For teams evaluating the dependency, this comparison should be based on required controls rather than feature count alone. Month, year, or decade selection can justify the component in a specialized form, while a plain mobile booking field may not.
Release Activity, Package Scope, and Upgrade Work
The repository is not archived. Its last push was on 2026-10-07, and the listed releases include v12.1.0 from 2026-07-28, v12.0.2 from 2026-04-07, and v12.0.1 from 2025-08-05. Those dates indicate recent repository activity and recent package releases, but they do not by themselves define upgrade compatibility for every consuming application.
The root project is a monorepo rather than the installable application package. Its workspace list contains `packages/*` and `test`, while the root build script delegates to the `react-date-picker` workspace. The sample application has its own `package.json`, `yarn.lock`, `tsconfig.json`, Vite configuration, and TypeScript entry files. Contributors working on the repository therefore have a different setup from application developers who install the published package with `npm` or `yarn`.
The project is licensed under MIT. That identifies the repository's declared license, but consumers still need to review their own compliance, dependency licenses, and distribution obligations. The README does not document a migration guide for v12, a support policy for older React versions beyond the compatibility table, or a release cadence. Those omissions matter when planning an upgrade. The first concrete checks are the selected React version and the API changes between the installed version and the target release.
Editorial conclusion
Adopt React-Date-Picker when a React application needs calendar-driven date entry, selection granularity beyond a native date field, or direct access to React-Calendar through calendarProps. Do not add it for a straightforward modern mobile form or when legacy browser support is mandatory, since the README recommends native date input for those cases. Before adoption, verify the React version, date value contract, browser targets, localization behavior, required CSS, and whether the advanced controls justify the dependency over <input type="date" />.
Frequently asked questions
What React versions are compatible with React-Date-Picker?
React-Date-Picker requires React 16.3 or later. The README says React 16.8 or later can use the latest version, while it directs React 16.3 users to 8.x and React 16.0 users to 7.x.
How do I install React-Date-Picker and display a date?
Install it with `npm install react-date-picker` or `yarn add react-date-picker`, import `DatePicker`, and render it with `value` and `onChange`. The README's example initializes the value with React state and `new Date()`.
Does React-Date-Picker replace a native date input?
It can be used instead of native date entry when an application needs a React calendar with days, months, years, or decades. The README still recommends native date input for basic forms on modern browsers because it adds no JavaScript bundle weight and is described as better suited to mobile use.
Does React-Date-Picker require moment.js?
No. The README explicitly says that moment.js is not needed.
Where are the CSS files imported from?
The documented imports are `react-date-picker/dist/DatePicker.css` for the date picker and `react-calendar/dist/Calendar.css` for the underlying calendar styles.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/wojtekmaj-react-date-picker)Was this useful?