反应 |完整日历未呈现全天事件

时间:2021-03-05 11:43:22

标签: javascript reactjs fullcalendar

我试图在完整日历中阻止几天,但在 UI 中只有一部分被填满 而且我还需要防止在那些被阻止的日期发生点击事件。 Sample code

  <FullCalendar
        className={style.calendar}
        defaultView="timeGridDay"
        themeSystem="bootstrap"
        plugins={[dayGridPlugin, interactionPlugin, timeGridPlugin]}
        header={{
          right: "prev,next today,timeGridDay,timeGridWeek,dayGridMonth",
        }}
        slotLabelInterval="00:30:00"
        slotLabelFormat={{
          hour: "2-digit",
          minute: "2-digit",
          hour12: timezonePref ? false : true,
        }}
        allDaySlot={true}
        weekends={true}
        events={[
          ...events,
          {
            start: "2021-03-06",
            end: "2021-03-06",
            allDay:true,
            display: "background",
          },
        ]}
        ref={this.calendarComponentRef}
        displayEventTime={false}
        nowIndicator={true}
        dateClick={this.onClickDate}
        eventClick={this.onClickEvent}
      />

我在事件中尝试了以下选项,结果仍然相同。 {开始:“2021-03-06”,结束:“2021-03-06”,显示:“背景”} {start: "2021-03-06", allDay:true,display: "background"}enter image description here

0 个答案:

没有答案