-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Description
Expected Behavior The restrictionRange prop of the MonthRangePicker component should restrict the selectable range to the months inside restrictionRange.
Actual Behavior The restrictionRange props only restricts year selection.
To Replicate (ES6 via Webpack and Babel)
import MonthRangePicker from 'react-monthrange-picker'
import moment from 'moment'
import 'moment-range'
<MonthRangePicker
ref={el => this.monthPicker = el}
direction="bottom"
onApply={console.log}
onCancel={console.log}
onYearChage={console.log}
onSelect={console.log}
selectedDateRange={moment.range(moment(), moment())}
restrictionRange={moment.range(moment().startOf('year'), moment())} />
I don't know if this is by design, but it seems as though the restriction range should apply to the months as well, like react-dates does with days (https://github.com/airbnb/react-dates). Doesn't seem too hard to implement...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels