user3376996
user3376996

Reputation: 111

FullCalendar synchronization

I need to synchronize FullCalendar - when an event object is dropped on a calendar it has to be shown on every other calendar opened. Right now I'm using refetchEvents, which is triggered by websockets, but it is very slow and resource consuming.

Is there a way to programmatically draw an event on a FullCalendar?

Upvotes: 0

Views: 723

Answers (2)

jones
jones

Reputation: 625

.fullCalendar('renderEVent',event,true) or call

.fullCalendar('updateEvent',event); inside eventReceive when you initialize the calendar:

$('#calendar').fullCalendar({
        ...

        eventReceive : function(event) {
              ...
              $('#calendar').fullCalendar('updateEvent',event);
         },

         ...
});

should do the trick

edit: realized this was an old thread, apologies

Upvotes: 0

Martijn Welker
Martijn Welker

Reputation: 5605

You could call .fullCalendar('renderEvent', eventObject, true); on the other calendars, this won't do any additional server calls. docs here

Upvotes: 1

Related Questions