![](/img/trans.png)
[英]How can I color a specific day with specific time with slotPropGetter of react-big-calendar?
[英]react-big-calendar navigate to specific day
問這個問題可能很愚蠢,但相信我,我是個新手。 實際上,當前的React-big-calendar
支持導航到從Month視圖中選擇的特定日期。 當用戶從“月份”視圖中單擊日期時,我想要同樣的東西。 請幫我
碼
<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)}
/>
如果我正確理解了您的問題,他們已經可以做到。 不是通過單擊整個日期單元格(用於選擇),而是通過單擊單元格中的“日期”數字。 這樣做會自動將用戶轉換為該日期的“天”視圖,除非您更改配置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.