1.0.2 • Published 5 years ago

react-reserve-rangepicker v1.0.2

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

React Reserve Rangepicker

Gregorian and Persian (Jalaali) Calendar

Installation

npm

npm install react-reserve-rangepicker

yarn

yarn add react-reserve-rangepicker

Usage

Rangepicker Component

/* @flow */
import React, { PureComponent } from "react";
import { RangePicker } from "react-reserve-rangepicker";

class MyComponent extends PureComponent {
  render() {
    return (
      <div className="MyComponent">
        <RangePicker />
      </div>
    );
  }
}

export default MyComponent;

Datepicker Component

/* @flow */
import React, { PureComponent } from "react";
import { Datepicker } from "react-reserve-rangepicker";

class MyComponent extends PureComponent {
  render() {
    return (
      <div className="MyComponent">
        <Datepicker />
      </div>
    );
  }
}

export default MyComponent;

API

The following APIs are shared by DatePicker and RangePicker.

PropertyDescriptionTypeDefaultExample
isPersianlocalization configurationbooleanFalse
disableDateSpecifies whether or not the previous days are selectablebooleanFalse
showTimeto provide an additional time selectionobject / booleanFalseshowTime={{ format: ‘HH:mm’ }}
disabledHourFromTo specify the start of the inactive time intervalobject{ }disabledHourFrom={10}
disabledHourToTo specify the end of the inactive time intervalobject{ }disabledHourTo={12}
disabledMinuteFromTo specify the start of the inactive minute intervalobject{ }disabledMinuteFrom={20}
disabledMinuteToTo specify the end of the inactive minute intervalobject{ }disabledMinuteTo={30}
startPlaceholderChange first input placeholderstringStart Date
endPlaceholderChange second input placeholderstringEnd Date

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.