ReactJS Daterangepicker-同一组件中的多个实例

时间:2019-07-11 09:44:09

标签: reactjs multiple-instances daterangepicker

如何在同一组件中添加日期范围选择器的多个实例。

<DateRangePicker
  startDate={this.state.startDate}
  startDateId="start_date1"
  endDate={this.state.endDate}
  endDateId="end_date1"
  onDatesChange={({ startDate, endDate }) => {
    this.setState({ startDate, endDate });
  }}
  focusedInput={this.state.focusedInput}
  onFocusChange={focusedInput => this.setState({ focusedInput })}
  displayFormat="DD/MM/YYYY"
  isOutsideRange={day => !isInclusivelyBeforeDay(day, moment())}
/>

1 个答案:

答案 0 :(得分:0)