wivku
wivku

Reputation: 2673

fullCalendar (v5) callback/handler anytime view is rendered?

What is the way to catch anytime a view is rendered?

Not only when switching views, but also when clicking today / prev / next?
I need to clear an array of unique event titles after (or before) each render is complete.

So, similar to eventAllRender which was removed starting v4.

Currently using .click event for all buttons, which does the trick, but I was hoping there was something really linked to the actual rendering.

calendar.render();

$('.fc-button').click( () => {
  console.log("do something")
})

Upvotes: 7

Views: 8791

Answers (1)

wivku
wivku

Reputation: 2673

https://fullcalendar.io/docs/datesSet

Called after the calendar’s date range has been initially set or changed in some way and the DOM has been updated.

datesSet: function(info) {
  // ...
}

Upvotes: 9

Related Questions