danger-calendar
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

danger-calendar

Made with create-react-library

NPM JavaScript Style Guide

Install

npm install --save danger-calendar

Usage

import React from 'react'

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

const Example = () => {
  const events = [
    {
      date: '2020-11-22 00:00:00',
      title: 'Happy Birthday',
      description: '',
      color: '#8e44ad'
    },
    {
      date: '2020-11-18 00:00:00',
      title: 'Meeting',
      description: '',
      color: '#27ae60'
    }
  ]
  return (
    <Calendar
      onClick={(value) => console.log(value)}
      onDoubleClick={(value) => console.log(value)}
      events={events}
      iso={false}
    />
  )
}

Props

Property Type Values Description Default
onClick Function Trigger function and returns a click event with a date after click
onDoubleCLick Function Trigger function and returns a click event with a date after double click
iso Boolean true false Changes calendar format to ISO 8601 (ISO 8601 starts in monday) false

License

MIT ©

Readme

Keywords

none

Package Sidebar

Install

npm i danger-calendar

Weekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

52.3 kB

Total Files

15

Last publish

Collaborators

  • danielapodaca96