creativetimofficial / ct-vue-paper-dashboard-pro

Vue Paper Dashboard PRO - made by Creative Tim
https://www.creative-tim.com/product/vue-paper-dashboard-pro
41 stars 13 forks source link

fullcalendar re-render #83

Open kwatog opened 5 years ago

kwatog commented 5 years ago

I just upgraded the v2.2 with the new jquery-less fullcalendar. I need to refresh the calendar after an ajax call. anybody know how to to do it?

this.$refs.calendar.render()

does not work

ghost commented 5 years ago

I have been working lately with full-calendar too and I have faced the same problem. I have not used the jquery version of the library though, but it seems that what was previously done through that is now done through the instance of the calendar:

const calendar = new Calendar(this.$refs['calendar'], {})

In order to save the reference I simply made a data entry and save it in there:

data: {
    $calendar: undefined
}

this.$calendar = calendar

After this you can do: this.$calendar.render() just like you were trying to