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

react-range-picker

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-range-picker

React Js based date/range picker. With this picker user can select date or range in the single calander not like other pickers which gives you two calander to pick start date and end date.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

React Js based date/range picker, unlike other range pickers it uses single calendar to select the range. Click here to see it in action

install

$ npm i react-range-picker --save

use

import RangePicker from "react-range-picker"

<RangePicker/>

APIS

APITypeDescription
defaultValueobjectset default values for the calendar - {startDate: Date, endDate: Date}
onDateSelectedfunctiongets called each time date/time gets selected (params - startDate, startDate)
onClosefunctiongets called when calendar closes or ok/select button is pressed
closeOnSelectbooleanif true picker will hide on select of a date or range (default false)
disableRangebooleanif true user can select only one date (default false)
selectTimebooleanif true, time select will show up on date select (default false)
rangeTillEndOfDaybooleanif true, then second selected date for range will have time of end of the day (11.59 PM) else it will have time of start of the day (12:00 AM)
placeholderfunction => ReactComponentchange placeholder, placeholder function will recieve following object as param - {startDate (date object),endDate (date object)}
placeholderTextstringreplaces placeholder default text
dateFormatstringformat of placeholder date
footerfunction => ReactComponentchange footer, footer function will recieve following object as param - {startDate (date object), endDate (date object),today (function) - to select today's date, close (function) - closes the calendar and calls, onClose callback passed by user}

Followings are the variables for the date format.

  • dd - date
  • DD - day short
  • DDDD - day full
  • mm - month
  • MM - month short
  • MMMM - month full
  • yyyy or YYYY - full year
  • h - hours
  • mi - minutes
  • a - lowercase period (am),
  • A - capital period (AM)

Keywords

FAQs

Package last updated on 25 Feb 2020

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