basic-react-calendar
TypeScript icon, indicating that this package has built-in type declarations

1.1.9-beta.3 • Public • Published

basic-react-calendar

Ultimate calendar for your React app.

  • Pick days, months, or even years
  • No moment.js needed

Getting started

Compatibility

Your project needs to use React 16.8 or later.

react-calendar uses modern web technologies. That's why it's so fast, lightweight and easy to style. This, however, comes at a cost of [supporting only modern browsers].

Installation

Add react-calendar to your project by executing npm install react-calendar or yarn add react-calendar.

Usage

Here's an example of basic usage:

import { useState } from "react";
import Calendar from "basic-react-calendar";

function MyApp() {
  const [value, setValue] = useState < string || null > null;

  const onChange = (val: string) => {
    setValue(val);
  };

  return (
    <div>
      <Calendar onChange={onChange} value={value} />
    </div>
  );
}

Custom styling

If you want to use default react-calendar styling to build upon it, you can import react-calendar's styles by using:

import "basic-react-calendar/dist/Calendar.css";

Props

coming soooooon

License

The MIT License.

Package Sidebar

Install

npm i basic-react-calendar

Weekly Downloads

18

Version

1.1.9-beta.3

License

MIT

Unpacked Size

59.9 kB

Total Files

13

Last publish

Collaborators

  • mohammedabbas