CroudTech/vue-fullcalendar

Dynamically changing editable and selectable properties

Closed this issue · 2 comments

Thanks for the project!

I use the wrapper on one page in the following way:

<FullCalendar
	ref="calendar"
    :events="totalEvents"
    :editable="editable"
    :selectable="editable"
    :header="calendar.header"
    :config="calendar.config"
/>

editable is a computed property on the component that the calendar is in. The calendar doesn't update the editable or selectable status when the property changes unless the entire calendar is destroyed and rerendered (changing tabs in my case). How can I get it to automatically update?

Hey

You should be able to achieve this with a combination of setting options dynamically and this wrapper's fireMethod function

Off the top of my head, something like this should work.

this.$refs.calendar.fireMethod('option', 'editable', true)

Thanks! The fireMethod option works great!