
$ npm install --save @bbon/react-calendar
import React, {useCallback} from 'react';
import { Calendar } from '@bbon/react-calendar';
import '@bbon/react-calendar/dist/calendar.css';
const MyComponent = () => {
const handleChangeSelection = useCallback(
(start?: string, end?: string) => {
console.info('Selected dates: ', start, end);
},
[],
);
return (
<div>
<Calendar
useMoveToYear
useMoveToMonth
highlightToday
showDate
onChange={handleChangeSelection}
/>
</div>
);
}

- Clone this repository.
- Change directory to example
- Install dependencies
- Start dev server
- Navigate to http://localhost:3000