Choose the interaction, value representation and integration dependencies before comparing visual customization.
React Calendar provides a calendar surface with navigation and range selection. React Datepicker integrates an input and popup calendar with optional time controls. React Datetime provides date-only, time-only or combined entry around Moment parsing. DayPicker focuses on a customizable calendar with single, multiple and range modes.
An inline grid, a typed field and a combined date/time control create different validation and interaction work. Do not choose merely from a calendar screenshot or assume every package returns the same value.
React Datetime requires Moment; its displayTimeZone option also needs the documented Moment Timezone setup. Its callback may represent a parsed value or text that has not become a valid value. That dependency and parsing model are concrete integration considerations.
React Datepicker's actual published interface includes timeZone with an optional date-fns-tz integration. Configure it deliberately instead of repeating a broad README statement that omits the option. DayPicker's unscoped and scoped names should not be ranked as independent calendar engines.
A calendar date, a local date/time and an absolute instant are different values. Locale display alone does not choose the storage zone or resolve daylight-saving boundaries. Test clearing, incomplete input, constraints and keyboard flow in the actual form. Component options do not by themselves establish the finished application's behavior.
Choose the customizable DayPicker calendar API when composing the surrounding field. The project prefers @daypicker/react for new integrations; the unscoped package remains a specific compatibility entry.
Choose a combined input/calendar workflow with optional time selection; configure the selected mode, stylesheet and any named-zone dependency.
Choose an inline calendar and range-selection surface when the application owns the surrounding input or popup.
Choose its Moment-based date/time editing when that parsing and formatting model fits. Handle incomplete text as well as valid values.
DayPicker is a React component for creating date pickers, calendars, and date inputs for web applications.
You are reading the README for react-day-picker, the legacy DayPicker package name. It remains available for compatibility and exposes the same DayPicker API in v10, but new projects should use @daypicker/react.
See daypicker.dev for guides, examples, and API reference, or read the v10 docs in the repository.
@daypicker/* add-on packages.DayPicker is written in TypeScript and compiled to CommonJS and ESM. It relies on date-fns for date manipulation and formatting.
Install the legacy DayPicker package name:
npm install react-day-picker
For new projects, prefer the @daypicker/react package name:
npm install @daypicker/react
import { useState } from "react";
import { DayPicker } from "react-day-picker";
import "react-day-picker/style.css";
function MyDatePicker() {
const [selected, setSelected] = useState<Date>();
return (
<DayPicker
mode="single"
selected={selected}
onSelect={setSelected}
footer={
selected ? `Selected: ${selected.toLocaleDateString()}` : "Pick a day."
}
/>
);
}
DayPicker is compatible with React 16.8 and later.
DayPicker is released under the MIT License.
Ask for help and share your experience with DayPicker:
Thank you to everyone supporting DayPicker - your sponsorship keeps this project maintained and evolving.