Skip to content

riccione83/yac-calendar

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published