Skip to content

Latest commit

 

History

History
200 lines (179 loc) · 6.04 KB

intro.mdx

File metadata and controls

200 lines (179 loc) · 6.04 KB
title Date Picker Component for React
sidebar_label Introduction
sidebar_position 1
slug /

React DayPicker

DayPicker is a React component for creating date pickers, calendars, and date inputs for web applications.

Features

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

Example

import { DayPicker } from "@daypicker/react";
import "@daypicker/react/style.css";

function MyDatePicker() {
  const [selected, setSelected] = useState<Date>();

  return (
    <DayPicker
      animate
      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