1.0.3 • Published 3 years ago

yac-calendar v1.0.3

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

yac-calendar

Calendar component written in react and typescript

NPM JavaScript Style Guide

Install

npm install --save yac-calendar

or

yarn add yac-calendar

Preview

alt text alt text alt text

Usage

import React, { Component } from 'react'

import Calendar from 'yac-calendar'
import 'yac-calendar/dist/index.css'

class Example extends Component {
  render() {
    return (
      <Calendar
        date={new Date()}
        timeRange={{
          start: new Date(2021, 2, 24),
          end: new Date(2021, 2, 26)
        }}
        onSelectRange={(start, end) => console.info('Selected:', start, end)}
      />
    )
  }
}

Props:

date => First date to show (this will select the first month) timeRange => Start and End date for the selection (optional) onSelectRange => callback after new range selected on the calendar. useDoubleMonths => Will show the component as 2 months calendar.

License

MIT © Riccardo Rizzo - riccione83

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago