Home

Awesome

<div align="center"> <br> <a href="https://almogtavor.github.io/date-range-picker"> <img src="images/../src/images/title.svg" width="800" height="400" alt="Click for Demo"> </a> <br> </div> <sup> <br /> <p align='center'> <a href="https://www.npmjs.com/package/dates-picker"><img alt="NPM" src="https://img.shields.io/badge/v1.0.3-npm-orange"></a> <p align='center'>āš›ļøšŸ“† Flexible React date range picker calendar with no dependencies</p> </p> <br /> <br /> </sup>

Example Image

Demo

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

<details> <summary>Read More</summary>

Main Features

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

PropertyTypeAllowed ValuesDefault ValueDescription
languageStringEnglish, HebrewEnglishcomponent's language. currently support English and Hebrew. Notice Languages such Hebrew changes the whole component from left to right to right to left.
colorsPaletteStringenabled, disabledenabledby enabling colors palette you can choose the component's color.
formatStringany combination of 2 Ds, 2 Ms and 2\4 Ys with otherDD-MM-YYYYthe format of the dates.
selectAllButtonStringenabled, disabledenableddepends on current board's view (dates, months, or years), select all enabled items.
startDatedatedate objectnew Date(1900, 0, 0)calendar's start date.
endDatedatedate objectnew Date(2025, 0, 0)calendar's end date.
firstDayOfWeekIndexint0 - 60 (sunday)first day of the week (etc monday, sunday).
pickMethodStringdate, range, rangesrangedate 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).
defaultColorStringany color format item#2196f3default component's color. becomes the first option on colors palette.
daysAmountTabStringenabled, disableddisabledby enabling, there will be a button on the left that you can open and choose prepared range, or days amount up to today.
boardsNumint1, 22by specifing you can choose the component's boards number.

Future Plans

</details>