0.0.2 • Published 5 years ago

@react-simple-component/calendar v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

react-simple-component-calendar

English | 中文

A simple calendar component build for react. Simple style, simple use, & powerless.

Online Demo

Usage

npm install --save @react-simple-component/calendar
<Calendar
  list={[
    {
      className: "active",
      time: 1560787200000
      // & every what fuck you want set on date element
    },
    {
      className: "active",
      time: 1553881332850
    }
  ]}
  now={new Date().valueOf()}
  onClick={(date: Date, item: ListItem): void => {
    console.log(date, item);
  }}
/>

Documentation

PropTypeDescription
listArrayEvery props you what to apply to button element
nowStringTimestamp which you what to mark today (will border highlight)
onClickFunctionWhen your click date element will trigger