Closed SagiSan closed 4 years ago
You pass the start/end dates as props into the DateRangePicker component and you define the onApply
function prop to update the state:
//...
handleDateRangeApply = (startDate, endDate) => {
this.setState({startDateTime: startDate.valueOf(), endDateTime: endDate.valueOf()});
}
//...
<DateRangePicker
startDate={moment(this.state.startDateTime)}
endDate={moment(this.state.endDateTime)}
onApply={this.handleDateRangeApply}
>
//...
Are you sure it is passing the redux connected props into the DateRangePicker component? Provide some sample code to make it easier to assist.
Are you sure it is passing the redux connected props into the DateRangePicker component? Provide some sample code to make it easier to assist.
Please ignore. I was passing incorrect attributes. it's working fine now. Thanks for the reply.
closing this due to inactivity. please re-open if this is still an issue in v6.0.0 or greater
Hi...How can update the startDate and endDate based on state. Are there any method like in jQuery version of picker?