Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-lite-calendar

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lite-calendar

React lite calendar component

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-lite-calendar

Travis npm package

React calendar component:

Getting started

Installation

npm install react-lite-calendar

Installation

Usage:

import React, { Component } from "react";
import LiteCalendar from "react-lite-calendar";

class App extends Component {
  state = {
    date: new Date()
  };

  handleChange = value => this.setState({ date: value });
  handleOpened = () => console.log("opened");
  handleClosed = () => console.log("closed");

  render() {
    return (
      <div>
        <LiteCalendar
          onOpened={this.handleOpened}
          onClosed={this.handleClosed}
          onChange={this.handleChange}
          value={this.state.date}
        />
      </div>
    );
  }
}

export default App;

User guide

Props
Prop nameDescriptionExample values
startThe beginning of a period that shall be selectable by default when no value is given. Defaults to new Date(1987, 9, 29).new Date(2017, 5, 1)
endThe ending of a period that shall be selectable by default when no value is given. Defaults to new Date(2020, 9, 29).new Date(2020, 5, 1)
onChangeFunction called when the user clicks an item (day on month view, month on year view and so on) on the most detailed view available.(value) => console.log('New date is: ', value)
onOpenedFunction called when calendar is opened.(value) => console.log('onOpened')
onClosedFunction called when calendar is closed.(value) => console.log('onClosed')
valueDefines the value of the calendar. Defaults to new Date().Date: new Date()
formatdayjs date format string for default trigger button. Defaults to "dddd, MMMM D, YYYY""dddd, MMMM D, YYYY"

License

The MIT License.

Author

Alexander Staroselsky

Keywords

FAQs

Package last updated on 10 Jul 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc