2.1.1 • Published 3 years ago
cmi-calendar v2.1.1
cmi-calendar
install
This package is using [react]. So following libs should be installed first
npm install cmi-calendar
then
import calendar from 'cmi-calendar'
props
type | default | description | |
---|---|---|---|
root | HTMLElement | none | Space to place the calendar |
year | number | none | Year of calendar to make |
month | number | none | Month of calendar to make |
example
import React, { useRef, useEffect } from "react";
import Calendar from "cmi-calendar";
const App = () => {
const calendar = useRef();
useEffect(() => {
Calendar(calendar, 2020, 12);
}, []);
return <div ref={calendar} />;
};
export default App;