react-reserve-rangepicker
npm install react-itours-rangepickerbash
npm install react-itours-rangepicker
`
yarn
`bash
yarn add react-itours-rangepicker
`
Usage
#### Rangepicker Component
`javascript
/ @flow /
import React, { PureComponent } from "react";
import { Rangepicker } from "react-itours-rangepicker";
class MyComponent extends PureComponent {
render() {
return (
);
}
}
export default MyComponent;
`
#### Datepicker Component
`javascript
/ @flow /
import React, { PureComponent } from "react";
import { Datepicker } from "react-itours-rangepicker";
class MyComponent extends PureComponent {
render() {
return (
);
}
}
export default MyComponent;
`
API
The following APIs are shared by Datepicker and Rangepicker.
| Property | Description | Type | Default | Example |
| ------------------ | --------------------------------------------------------- | ---------------- | ---------- | -------------------------------- |
| enableDateFrom | To specify the start of the active date interval | string | - | enableDateFrom="2019-07-25" |
| enableDateTo | To specify the end of the active date interval | string | - | enableDateTo="2019-07-30" |
| disablePastDays | Specifies whether or not the previous days are selectable | boolean | False | |
| preventTwice | Prevents duplicate selection of a date | boolean | False | |
| showTime | to provide an additional time selection | object / boolean | False | showTime={{ format: ‘HH:mm’ }} |
| disabledHourFrom | To specify the start of the inactive time interval | object | { } | disabledHourFrom={10} |
| disabledHourTo | To specify the end of the inactive time interval | object | { } | disabledHourTo={12} |
| disabledMinuteFrom | To specify the start of the inactive minute interval | object | { } | disabledMinuteFrom={20} |
| disabledMinuteTo | To specify the end of the inactive minute interval | object | { } | disabledMinuteTo={30} |
| startPlaceholder | Change first input placeholder | string | Start Date | |
| endPlaceholder | Change second input placeholder | string | End Date | ` |