簡體   English   中英

大日歷反應到特定的日期

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM