【问题标题】:Want to bring events to show on fullcalendar想要在 fullcalendar 上显示活动
【发布时间】:2021-05-25 08:36:52
【问题描述】:

我使用 fullcalendar-Angular (angular 11 , fullcalendar 5.5.0)。

但我无法检索要在日历上显示的事件。

我在下图中检索事件:

https://i.stack.imgur.com/UdAGJ.png

这是获取代码。

   
   this.Studio.getStudioCalendar().subscribe(data => {
        data["data"].map((list) => {
              this.eventDateSet.push(list);
           });
           this.calendarOptions;
           console.log("calendar data :",this.eventDateSet)
           console.log("calendarOptions  :",this.calendarOptions)
   })
 } 

这是 libar FullCalendar 的代码。

    dateClick: this.handleDateClick.bind(this),
    headerToolbar: {
      left: "prev,next today",
      center: "title",
      right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek,prevYear,nextYear",
    },
    initialView: "dayGridMonth",
    weekends: true,
    editable: true,
    selectable: true,
    selectMirror: true,
    dayMaxEvents: true,
    dayHeaderFormat: {
      weekday: "short",
      month: "numeric",
      day: "numeric",
      omitCommas: true,
    },
    buttonText: {
      today: "วันนี้",
      month: "เดือน",
      week: "สัปดาห์",
      day: "วัน",
      list: "กำหนดการ",
    },
    locale: "th",
   events: [this.eventDateSet],
  }; 

【问题讨论】:

    标签: javascript fullcalendar fullcalendar-5 angular11


    【解决方案1】:

    您可能想尝试使用 CalendarOptionsinitialEvents 属性。

    此外,您的事件应该是 EventInput 类型,它不包含 dateStartdateEnd 属性,而只包含 startend

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-02-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多