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-dates-lite

v0.0.46

Published

React calendar component for selecting dates

Readme

react-dates-lite

Build Status codecov

Install

yarn add styled-components - peerDependency, also check that you have react and react-dom

yarn add react-dates-lite

API

Example

import Calendar from "react-dates-lite";

<Calendar
  visibleMonths={1}
  firstMonth={new Date(2018, 1, 1)}
  lastMonth={new Date(2018, 2, 1)}
  selectedDates={[new Date()]}
  selectDates={console.log}
/>;

see this Example or Live demo

Props

  • visibleMonths?: number - how many months will be visible (default 1)
  • firstMonth: Date - first month in calendar, months between first and last (included) will be in calendar
  • lastMonth: Date - last month in calendar, months between first and last (included) will be in calendar
  • selectDates: Date[] => any - will receive array of Dates that were selected
  • selectedDates: Date[] - array of Dates that are selected
  • disabledDates: Date[] - array of Dates that cannot be selected
  • allowedDates?: Date[] - array of dates that are selectable (default []) when it's empty, all dates are selectable (except disabled dates)
  • future?: boolean - if future dates from today will be enabled (default true)
  • past?: boolean - if past dates from today will be enabled (default true)
  • rangeSelect?: boolean - if enabled, ranges can be selected, otherwise just one date (default true)
  • className?: string - will provide class to the Calendar container (default '')
  • colors?: { [string]: number } - will provide colors to these stuff:
    • selected - background-color of selected date
    • selectedHover - background-color of selected date that is hovered
    • hover - background-color of date that is hovered
    • border - border color
    • background - default background-color
    • disabled - color of disabled date
    • default values:
    colors = {
      selected: "rgb(244, 114, 49)",
      selectedHover: "rgb(255, 141, 74)",
      border: "#e4e7e7",
      background: "white",
      hover: "#e4e7e7",
      disabled: "gray"
    };
  • classes?: { [string]: string } - will provide colors to these stuff:
    • button - class for buttons
    • calendarWrapper - class for calendar wrapper
    • month - class for single month wrapper
    • day - class for day
    • weekDay - class for weekDay
    • monthName - class for monthName
    • default value: {}
  • customClasses?: { [className: string]: Date[] } - add className to specified dates
  • CustomTd?: React.ComponentType<CalendarDayProps> - custom day component (original CalendarDay)
  • showMonthName: boolean - show / hide month names
  • showWeekDayNames: boolean - show / hide week day names
  • weekDayFormat?: string - week day format, e.g. E
  • weekDayFormatter?: Date => string - week day formatter function, e.g. day => format(day, 'E') (can be used to pass locale)
  • monthNameFormatter?: Date => string - month name formatter function, e.g. month => format(month, 'MMMM yyyy') (can be used to pass locale)
  • width?: number - custom base width of a single calendar (excluding margins)
  • buttonBack?: React.Node - custom back button (will receive disabled prop)
  • buttonForward?: React.Node - custom forwrad button (will receive disabled prop)
  • firstWeekDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6 - set day that will be displayed first (0 is sunday and also default value)

Contributing

PRs are welcome.

  1. install dependencies: yarn
  2. develop with storybook: yarn storybook, or with webpack-dev-server: yarn start

License

MIT