Getting Started
May 2, 2026 ยท View on GitHub
Install the Package
DayPicker is available as the @daypicker/react npm package.
npm install @daypicker/react@next
:::note Legacy package name
The react-day-picker package name remains available in v10 for
compatibility, but new projects should install and import from
@daypicker/react.
:::
Basic Usage
To add a simple date picker to your app:
- Import the component and styles from
@daypicker/react. - Choose a selection mode using the
modeprop. - Use the
selectedandonSelectprops to control the selected date.
import { useState } from "react";
import { DayPicker } from "@daypicker/react";
import "@daypicker/react/style.css";
export function MyDatePicker() {
const [selected, setSelected] = useState<Date>();
return (
<DayPicker
animate
mode="single"
selected={selected}
onSelect={setSelected}
footer={
selected ? `Selected: ${selected.toLocaleDateString()}` : "Pick a day."
}
/>
);
}
Learn More
- ๐ DayPicker Anatomy - Understand the parts that make up a DayPicker component.
- ๐ฎ DayPicker Playground - Experiment with v10 and see the code update in real time.
- ๐ API Reference - Browse the v10 props, components, labels, utilities, and calendar package APIs.
Customization
- ๐จ Styling - Customize the style to match DayPicker with your app's look and feel.
- โ๏ธ Appearance - Discover the options available to customize the calendar.
- ๐ Months Navigation - Change how users can navigate between months and years.
- ๐งฉ Caption and Navigation Layouts - Configure how captions and navigation controls render.
- ๐บ๏ธ Grid and Months - Control calendar grids and multiple-month layouts.
- ๐ข Week Numbers and Footer - Show week numbers and customize footer content.
Selecting Days
- ๐ Selection Modes - Enable users to select days with single, multiple, or range selections.
- 1๏ธโฃ Single Mode - Configure and handle single-date selection.
- ๐ Multiple Mode - Allow selecting multiple dates at once.
- โ๏ธ Range Mode - Manage start and end date selection ranges.
- ๐ซ Disabling Dates - Prevent selection of specific days.
Localization
- ๐ Localization - Configure DayPicker to display the calendar in different languages and date formats.
- ๐ฐ๏ธ Setting Time Zone - Render calendars and selections in a specific time zone.
- ๐๏ธ ISO and Broadcast Calendars - Switch between ISO and broadcast calendar systems.
- ๐ Persian Calendar - Use the Persian calendar.
- ๐ Hijri Calendar - Use the Hijri (Umm al-Qura) calendar.
- ๐ Buddhist (Thai) Calendar - Use the Buddhist calendar.
- ๐ Hebrew Calendar - Use the Hebrew calendar.
- ๐ฏ๏ธ Ethiopic Calendar - Use the Ethiopic calendar.
Guides
- ๐ค Input Fields - Learn how to use DayPicker with input fields and form libraries.
- ๐ Time Picker - Add time selection alongside dates.
- ๐ Custom Selections - Create custom selection rules.
- ๐ท๏ธ Custom Modifiers - Highlight specific days in the calendar using custom modifiers.
- ๐ Custom Components - Use custom components to create a fully customized date picker.
- ๐ณ Translating DayPicker - Translate the labels and messages of the calendar.
- ๐ฆฎ Accessible Date Pickers - Make your date picker accessible to all users.