这可能是个愚蠢的问题,但请相信我,我是个新手。实际上,当前的 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/