You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to hide the component when a range date has been selected (keeping it open feels like a bug).
So in the onChange callback, i was expecting some information about the context (let's say something like context=startDate|endDate|actionButton), so if context is different from 'startDate' i keep it displayed, otherwise, i hide it.
Maybe there is already another way to implement that classic behavior?
The text was updated successfully, but these errors were encountered:
Normally react-date-range controls focused range itself by the way you can control it them with focusedRange and onRangeFocusChange props. If you control it you can is it start date or end date like below.
<DateRangePicker{...props}focusedRange={this.state.focusedRange}onRangeFocusChange={focusedRange=>{const[rangeIndex,rangeStep]=focusedRange;if(rangeStep===0){console.log('start date');}else{console.log('end date');}// also don't forget to set focused rangethis.setState({focusedRange});}}/>
Hi,
First, thanks for this great module :)
I would like to hide the component when a range date has been selected (keeping it open feels like a bug).
So in the
onChange
callback, i was expecting some information about the context (let's say something like context=startDate|endDate|actionButton), so if context is different from 'startDate' i keep it displayed, otherwise, i hide it.Maybe there is already another way to implement that classic behavior?
The text was updated successfully, but these errors were encountered: