calendar

A simple React Calendar component

Sep 11, 2021
A simple React Calendar component

react-calendar

A simple React Calendar component.

View Demo View Github

Peer dependencies

Installation

$ npm install --save @bbon/react-calendar

Usages

import React, {useCallback} from 'react'; import { Calendar } from ''; 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> ); }

example-001

Example

  1. Clone this repository.
  2. Change directory to example
$ cd example
  1. Install dependencies
$ npm install
  1. Start dev server
$ npm run dev
  1. Navigate to http://localhost:3000
Recommended