2

I have this code :

 <full-calendar
    #calendar
    [events]="getFilteredEvents()"
    (dayRender)="handleDateRender($event)"
    (datesRender)="handleDatesRender($event)"
    (eventClick)="handleEventClick($event)"
    (eventRender)="handleEventRender($event)"
    (loading)="loading($event)"
 ></full-calendar>
 .....
 loading(event) {
    console.log(event);
}

I want to display a loader while the api call is done. But my console.log is not displayed. Maybe there is another way to know when the render of calendar is finished.

GPiter
  • 779
  • 1
  • 11
  • 24
  • Do the other callbacks lke dayRender, datesRender etc work correctly for you? Bear in mind that loading doesn't run just when the calendar is being rendered, it's specifically and only triggered you fetch events via AJAX (when your calendar is configured using the https://fullcalendar.io/docs/v4/events-json-feed or https://fullcalendar.io/docs/v4/events-function patterns). Judging by `[events]="getFilteredEvents()"` seeming to directly call a function (rather than providing a reference to a function) I would assume you're loading static events rather than from an AJAX-based source. – ADyson Jul 08 '21 at 09:18
  • I have a similar question in React: https://stackoverflow.com/questions/74867246/fullcalendar-react-setting-a-loading-status-loading-events – Ben in CA Dec 20 '22 at 18:14

0 Answers0