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

react-daypicker

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-daypicker

A simple datepicker inspired by Pikaday.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
136
decreased by-41.63%
Maintainers
1
Weekly downloads
 
Created
Source

react-daypicker

A simple datepicker inspired by Pikaday.

DayPicker screenshot

Installation

yarn

yarn add react-daypicker

npm

npm install --save react-daypicker

Usage

import 'react-daypicker/lib/DayPicker.css';
import DayPicker from 'react-daypicker';

The only required property is onDayClick which is called when a day is clicked.

<DayPicker onDayClick={(day) => this.setState({ day })} />

An optional property active can be added in order to mark a day as active:

<DayPicker
  active={moment().add(1, 'day')}
  onDayClick={(day) => this.setState({ day })}
/>

Note that active is expected to be an instance of moment from Moment.js.

Options on styling

You can import the Sass stylesheet instead:

import 'react-daypicker/src/DayPicker.scss';

The root element is .react-daypicker-root.

Dependencies

React and Moment.js are peer dependencies.

Keywords

FAQs

Package last updated on 27 Oct 2016

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