npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-datepicker-clean

v2.3.0

Published

A clean datepicker for react

Readme

React DatePicker

A simple and configurable datepicker made for React, free from any dependencies other than React.

Installation

Install it from npm and include it in your React build process (using Webpack, Browserify, etc):

npm install --save react-datepicker-clean

Note that React is needed in the project for this component to work and must be installed separately since it is not included in the package.

Usage

Most basic usage:

import React from "react";
import DatePicker from "react-datepicker-clean";

class Example extends React.Component {
  constructor(props) {
    this.state = {
      dates: []
    };
  }

  handleChange = dates => {
    this.setState({ dates });
  };

  render() {
    return (
      <DatePicker
        onDateClick={this.handleChange}
      />
    );
  }
}

Properties

This datepicker has a number of properties that can be used

Mandatory properties:

name | type | description --- | --- | --- onDateClick | Function | Function to use when user clicks a date. Must take array of dates as argument.

Optional properties:

name | type | default value | description --- | --- | --- | --- weekStart | number<0 | 1 | 2 | 3 | 4 | 5 | 6> | 0 | Indicates which day is the first day of the week. 0 is Sunday, 6 is Saturday. weekHoliday | number<-1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | Indicates which date that should be designated weekly holiday (default red number instead of black). 0 is Sunday, 6 is Saturday. Set to -1 to disable this option. showWeekNumber | boolean | true | Set to false to hide week numbers. multiChoice | boolean | false | Set to true if the user should be able to choose more than one date. multiSpan | boolean | false | Set to true to make the choose a span of dates instead of multiple single dates. Disabled if multiChoice is set ti false. allowBefore | boolean | false | Set to true if the user should be allowed to choose dates before the current date. chosenDates | Array<Date | string | number> | [] | Any dates that should be chosen already. Can use same state element array that is updated in onDateClick. Elements can be Date object, ISO-8601 date string, UNIX timestamp or an array containing two dates. If the element is an array of two dates, all dates between (and including) the two dates will be marked. blockedDates | Array<Date | string | number> | [] | Any dates that should be blocked from selecting. Elements can be Date object, ISO-8601 date string, UNIX timestamp or an array containing two dates. If the element is an array of two dates, all dates between (and including) the two dates will be marked. holidayDates | Array<Date | string | number> | [] | Any holidays that should be marked as holiday (default red number instead of black). Elements can be Date object, ISO-8601 date string, UNIX timestamp or an array containing two dates. If the element is an array of two dates, all dates between (and including) the two dates will be marked. yearsDiff | number | 100 | How many years should be visible in years list (before if allowBefore is set to true and) after the current year. locale | string | 'en' | Locale to use. List of available locales can be found here. Use the value in the "Code" column.

ToDo:

  • Add custom styling properties.