I'm trying to create a staticRange of "More than 2 years ago". Setting startDate to null and endDate to the correct date object for the staticRange entry. The isSelected handler is not triggering when clicked.
[BUG] Bug Reproduce Steps
Setup a DateRange component with this staticRange (uses date-fns set()):
[{
label: 'More than 2 years ago',
range: () => ({
startDate: null,
endDate: set(new Date(), { year: new Date().getFullYear() - 2 })
}),
isSelected(range) {
debugger;
}
}]
Subject of the issue
I'm trying to create a staticRange of "More than 2 years ago". Setting startDate to null and endDate to the correct date object for the staticRange entry. The
isSelected
handler is not triggering when clicked.[BUG] Bug Reproduce Steps
set()
):[BUG] Expected behaviour
I am expecting the
isSelected
method to runEnvironment
Package Version: 1.4.0 React version: 16.14 Node version: 8.6 Browser: Chrome