react-day-picker

Customizable Date Picker for React

react-day-picker downloads react-day-picker version react-day-picker license

react-day-picker类似的npm包:

npm下载趋势

3 年
🌟 在 react-day-picker 的 README.md 中显示实时使用量图表,只需复制下面的代码。
## Usage Trend
[![Usage Trend of react-day-picker](https://npm-compare.com/img/npm-trend/THREE_YEARS/react-day-picker.png)](https://npm-compare.com/react-day-picker#timeRange=THREE_YEARS)

Cumulative GitHub Star Trend

🌟 在 react-day-picker 的 README.md 中显示 GitHub stars 趋势图表,只需复制下面的代码。
## GitHub Stars Trend
[![GitHub Stars Trend of react-day-picker](https://npm-compare.com/img/github-trend/react-day-picker.png)](https://npm-compare.com/react-day-picker)

统计详情

npm包名称
下载量
Stars
大小
Issues
发布时间
License
react-day-picker33,773,8936,853987 kB144 个月前MIT

react-day-picker的README

React DayPicker

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.

Documentation

See daypicker.dev for guides, examples, and API reference, or read the v10 docs in the repository.

Screenshot of DayPicker displaying the September 2025 calendar, with the date range from the 17th to the 20th selected.

Features

DayPicker is written in TypeScript and compiled to CommonJS and ESM. It relies on date-fns for date manipulation and formatting.

Installation

Install the legacy DayPicker package name:

npm install react-day-picker

For new projects, prefer the @daypicker/react package name:

npm install @daypicker/react

npm version npm downloads Min gzipped size

Example

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."
      }
    />
  );
}

Compatibility

DayPicker is compatible with React 16.8 and later.

License

DayPicker is released under the MIT License.

Community

Ask for help and share your experience with DayPicker:

Sponsors

Thank you to everyone supporting DayPicker - your sponsorship keeps this project maintained and evolving.

CHECK24 wilsonadenuga severinlandolt syntaxfm thnxdev katyabilokur bedandbreakfasteu Thinkmill AlexKDawson dimitur2204 indeedeng flexbox github tjfred35