1.4.14 • Published 4 years ago

bookish-octo-parakeet v1.4.14

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

React Js based date/range picker

install

$ npm i react-range-picker --save

use

import RangePicker from "react-range-picker"

<RangePicker/>

APIS

APITypeDescription
visiblebooleanto controlled visibility of the calendar, only works if on calendar mount visible prop is a boolean value
defaultValueobjectset default values for the calendar - {startDate: Date, endDate: Date}
onDateSelectedfunctiongets called each time date/time gets selected (params - startDate, startDate)
onOpenfunctiongets called when calendar opens
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)
closeOnOutsideClickbooleanif true calendar won't close on click of outside area (default true)
disableRangebooleanif true user can select only one date (default false)
localestringset calendar locale for the calendar
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 receive following object as param - {startDate (date object),endDate (date object)}
placeholderTextstringreplaces placeholder default text
dateFormatstringformat of placeholder date
footerfunction => ReactComponentchange footer, footer function will receive 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}
maxDatenumbermaximal date passed in utc timestamp (default 10 years since current date)
minDatenumberminimal date passed in utc timestamp (default 10 years since current date)

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)
1.4.14

4 years ago

1.4.13

4 years ago

1.4.12

4 years ago

1.4.11

4 years ago

1.4.10

4 years ago

1.4.9

4 years ago

1.4.8

4 years ago

1.4.7

4 years ago

1.4.6

4 years ago

1.4.5

4 years ago

1.4.4

4 years ago

1.4.3

4 years ago

1.4.2

4 years ago

1.4.1

4 years ago

1.4.0

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.2

4 years ago

1.2.1

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago