react-big-calendar navigate to specific day

China☆狼群 提交于 2019-12-11 05:22:18

问题


it might be silly question to ask but trust me I am new to react . Actually , current React-big-calendar support navigate to specific date which are selected from Month view . I want same thing when user click on day from Month view I want to navigate user to specific day . please help me

Code

<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)}
    />

回答1:


If I'm understanding your question correctly, they can already do this. Not by clicking on the entire date cell (which is used for selection), but by clicking on the 'date' number in the cell. Doing so will automatically transition the user to that date's 'day' view, unless you change the configuration.



来源:https://stackoverflow.com/questions/57629655/react-big-calendar-navigate-to-specific-day

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!