Package Exports
- react-day-picker
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-day-picker) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
DayPicker
DayPicker is a reusable date picker component for React.
$ npm install react-day-picker@next
v8 is in beta
⚠️ This branch is for the next major version 8 – which is currently in development and not ready for production. For the stable version see the v7 branch.
Main features
- depends on date-fns as date library
- not opinionated, extensible user interface
- support for ARIA
- localizable
- incomplete "Main features" list
Documentation
Example
function Example() {
const [selected, setSelected] = useState();
const handleDayClick = (day, { selected }) => {
if (!selected) setSelected(day);
else setSelected();
};
return <DayPicker selected={selected} onDayClick={handleDayClick} />;
}