730 B
730 B
This component extends all the props of Calendar component. In addition to those props, it has the following props:
| Prop Name | Type |
|---|---|
| moveRangeOnFirstSelection | boolean |
| retainEndDateOnFirstSelection | boolean |
| onRangeFocusChange | function |
| rangeColors | array |
| ranges | array |
Example: Editable Date Inputs
import {useState} from 'react'
const [state, setState] = useState([
{
startDate: new Date(),
endDate: null,
key: 'selection'
}
]);
<DateRange
editableDateInputs={true}
onChange={item => setState([item.selection])}
moveRangeOnFirstSelection={false}
ranges={state}
/>