Add a date picker to a React app that lets users select a single day, month, year, or a date range.
Build a booking or scheduling form where users can choose a start and end date without relying on heavy date libraries.
Display a localized calendar in multiple languages using the browser's built-in internationalization support.
Requires React 16.8 or newer, older browsers may need a polyfill for the native internationalization API.
react-calendar is a calendar component for React applications. React is a JavaScript library for building user interfaces, and react-calendar plugs in as a reusable piece that displays and handles date selection. The component handles several levels of date picking: you can let users select a specific day, a month, a year, or even a decade. It also supports range selection, meaning users can click a start date and an end date to select a span of time. It supports many languages through built-in internationalization and does not require the moment.js date library, which is a common external dependency that can add significant size to a web project. Installation is straightforward: run npm install react-calendar and then drop the Calendar component into your React tree. By default it shows a monthly view with navigation controls for moving between months and years. You pass a callback via the onChange prop to receive the selected date or range. Optional default styling is available as an importable CSS file, and you can build custom styles on top of it. The project documentation is written for version 4.x. Earlier versions had different APIs and are documented on separate branches. The component requires React 16.8 or newer and targets modern browsers that support the browser-native internationalization API. For older browsers or locales that are not supported natively, polyfills are available. The full README is longer than what was shown.
← wojtekmaj on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.