javascript - React-big-calendar 导航到特定日期

标签 javascript reactjs ecmascript-6 react-big-calendar

这可能是个愚蠢的问题,但请相信我,我是个新手。实际上,当前的 React-big-calendar 支持导航到从月 View 中选择的特定日期。当用户从月 View 中单击日期时,我想要同样的事情,我想将用户导航到特定日期。请帮助我

代码

<MyCalendar
      popup
      selectable
      timeslots={1}
      localizer={localizer}
      view={this.state.viewing}
      views={[this.state.viewing]}
      components={{ toolbar: CustomToolbar }}
      style={{ height: 600 }}
      startAccessor="start"
      endAccessor="end"
      min={new Date(2019, 10, 0, 7, 0, 0)}
      max={new Date(2019, 10, 0, 22, 0, 0)}
      events={this.props.events}
      eventPropGetter={this.eventStyleGetter}
      onSelectEvent={slotInfo => this.onSelectEventHandler(slotInfo)}
      onSelectSlot={slotInfo => this.onSelectEventSlotHandler(slotInfo)}
    />

最佳答案

如果我正确理解你的问题,他们已经可以做到这一点。不是通过单击整个日期单元格(用于选择),而是通过单击单元格中的“日期”数字。这样做会自动将用户转换到该日期的“日” View ,除非您更改配置。

关于javascript - React-big-calendar 导航到特定日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57629655/

相关文章:

javascript - Babel 已经做了 Object.create(superClass.prototype) 为什么还要用 setPrototypeOf 来继承?

javascript - Dropbox 的着陆页下载过程如何运作得如此出色?

javascript - 为什么我未完成的 javascript 游戏在第三次死亡后崩溃?

javascript - 在 React 中将数据从子级传递给父级

reactjs - React 新手,购物车中的增量/减量

javascript - 如何在 jsdoc 函数参数中指定 Date 对象?

javascript - Highcharts固体规范动态更新

javascript - Node.js Discordie Bot Promise 拒绝错误

javascript - JS : What do the curly braces inside function parameter declarations mean?

javascript - 如何在 ReactJS 中更改按钮文本