basic-react-calendar
v1.2.3
Published
This is a simple react calendar package
Downloads
37
Maintainers
Readme
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.
basic-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 basic-react-calendar
or yarn add basic-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 basic-react-calendar styling to build upon it, you can import basic-react-calendar's styles by using:
import "basic-react-calendar/dist/Calendar.css";
Props
coming soooooon
License
The MIT License.