@bbon/react-calendar
TypeScript icon, indicating that this package has built-in type declarations

0.5.0 • Public • Published

react-calendar

npm (scoped) npm Build and tag publish NPM

Peer dependencies

Installation

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

Usages

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>
    );
}

example

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

Package Sidebar

Install

npm i @bbon/react-calendar

Weekly Downloads

1

Version

0.5.0

License

MIT

Unpacked Size

96.6 kB

Total Files

15

Last publish

Collaborators

  • bbon