I'm using Airbnb react-dates. I've added it to my project and it's working fine, the component looks like this:
<DateRangePicker
startDate={this.state.startDate} // momentPropTypes.momentObj or null,
startDateId="your_unique_start_date_id" // PropTypes.string.isRequired,
endDate={this.state.endDate} // momentPropTypes.momentObj or null,
endDateId="your_unique_end_date_id" // PropTypes.string.isRequired,
onDatesChange={this.onDatesChange} // PropTypes.func.isRequired,
focusedInput={this.state.focusedInput} // PropTypes.oneOf([START_DATE, END_DATE]) or null,
onFocusChange={focusedInput => this.setState({ focusedInput })} // PropTypes.func.isRequired,
daySize={50}
noBorder={true}
isOutsideRange={() => false}
/>
I just added it to my project, and as you can see there is my method onDatesChange and everything is fine, but I'm wondering how can I trigger some method when END_DATE
is selected.
For example, I would like to filter something when the end date is touched...