【问题标题】:How to add a button to react-date-range如何将按钮添加到 react-date-range
【发布时间】:2020-09-03 07:35:55
【问题描述】:
import { DateRangePicker } from 'react-date-range';

<DateRangePicker
   onChange={(item) => { this.handleonDateRange(item)}}
   showSelectionPreview={true}
   moveRangeOnFirstSelection={false}
   months={2}
   ranges={this.state.dateRange}
   direction="horizontal"
/>   

图片是

如何在右下角添加应用按钮??这样当用户点击应用按钮时,我可以隐藏日历

【问题讨论】:

    标签: reactjs react-redux react-datepicker


    【解决方案1】:

    目前还没有在 react-date-range 中提供按钮的选项, 但是我们可以将 DateRangePicker 包含在 Bootstrap React-Modal 中,我们可以在 Bootstrap React-Modal 中添加一个按钮

    【讨论】:

      猜你喜欢
      • 2021-05-21
      • 1970-01-01
      • 2021-12-03
      • 2017-10-15
      • 2014-05-13
      • 2018-07-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多