[Vuejs]-Full-Calendar Vue refetch-events error? nothing appears to happen

0👍

Firstly, your syntax appears to be wrong. Instead of

this.$refs.fullCalendar.$emit('refetch-events')

it should be

this.$refs.fullCalendar.refetchEvents()

Secondly, whether anything then happens depends on how your events feed is defined – which you haven’t shown us. So I’ll simply set out the possibilities:

If you’ve specified the "events" option as either a URL or a function then you’ll see that fullCalendar will request an updated list of events (either by making an AJAX request to the URL, or by executing the function).

But if you’ve simply passed a static array of events to fullCalendar, then refetch does nothing because there’s nowhere for it to go and get new events – in that case it’s only got a list of events, it does not have any information about the source of those events, so logically it cannot search anywhere for updates.

Leave a comment