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 πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

dates-picker

v1.0.18

Published

βš›οΈπŸ“† Flexible React date range picker calendar with no dependencies.

Downloads

18

Readme

Example Image

Demo

Demo page at https://almogtavor.github.io/date-range-picker/

Main Features

  • Pick method - an option of configuring the component to be date picker, range picker, or ranges picker.
  • Days amount tab - an option of selecting a number of days backward from the current date immediately by choosing a number.
  • Colors palette - an option of determining the component's color (can be disabled removed).
  • Language - English and Hebrew support.
  • Select all button - an option of selecting all of the current board's dates. Whether viewing dates, months, or years.
  • Boards number - an option of configuring components to be in one board or two boards.

Installation

$ npm i dates-picker

Usage

function callbackFunction(dates) {
    console.log(`The range of dates that got picked is: ${dates.text}`);
    console.log(`The min date that got picked is: ${dates.minDate}`);
    console.log(`The max date that got picked is: ${dates.maxDate}`);
    console.log(`The number of days that got picked is: ${dates.numberOfDaysPicked}`);
    console.log(`All dates: ${dates.allDates}`);
}

function MyComponent() {
    return (
      <DateRangePicker 
        callback={callbackFunction}
      />
    )
  }
}

Options

Property | Type | Allowed Values | Default Value | Description -------------------------------------|-----------|------------------|----------------------|----------------------------------------------- language | String | English, Hebrew | English | component's language. currently support English and Hebrew. Notice Languages such Hebrew changes the whole component from left to right to right to left. colorsPalette | String | enabled, disabled | enabled | by enabling colors palette you can choose the component's color. format | String | any combination of 2 Ds, 2 Ms and 2\4 Ys with other | DD-MM-YYYY | the format of the dates. selectAllButton | String | enabled, disabled | enabled| depends on current board's view (dates, months, or years), select all enabled items. startDate | date | date object | new Date(1900, 0, 0) | calendar's start date. endDate | date | date object | new Date(2025, 0, 0) | calendar's end date. firstDayOfWeekIndex | int | 0 - 6 | 0 (sunday) | first day of the week (etc monday, sunday). pickMethod | String | date, range, ranges | range | date means picking one day (on one board). range is to peak dates two dates. ranges is to pick an array of ranges (with view option on hover). defaultColor | String | any color format item | #2196f3 | default component's color. becomes the first option on colors palette. daysAmountTab | String | enabled, disabled | disabled | by enabling, there will be a button on the left that you can open and choose prepared range, or days amount up to today. boardsNum | int | 1, 2 | 2 | by specifing you can choose the component's boards number.

Future Plans

  • Add simple and intuitive time picker option (by list\ or visual clock\ both).
  • Tooltips for buttons explanation (for example on select all button).
  • On non-component-screen click, close component.
  • Go back button on non-dates mode (or on all modes for previous). When the user is in month's or year's mode, add an option to return to dates mode without choosing any value.
  • Component & button sizes parameters
  • Border radius parameter
  • An option to cancel picked range from the input label