1

I use Fullcalendar with events (received by ajax call).

When I click on a slot I save an event in the database. After that I click on the "Next" or "Prev" buttons. At that moment I want to render my saved event on the calendar, but I can't. It doesn't work this way:

var resEvent = JSON.parse(reservedEvent.val()); 
$('#calendarContainer').fullCalendar('removeEvents', resEvent.id);
$('#calendarContainer').fullCalendar('renderEvent', resEvent);

The ID of the event was changed, and I have 2 events on one slot now. Could you please advise me of possible solutions?

ADyson
  • 57,178
  • 14
  • 51
  • 63
ovod
  • 49
  • 1
  • 7
  • Is this answering you question? [Link](https://stackoverflow.com/questions/22854067/how-to-programmatically-update-the-rendering-of-an-event-in-fullcalendar) – Premlatha Feb 10 '20 at 01:38
  • When are you executing this code exactly? It is during some callback? It's unclear. Also I don't understand why you want to delete the re-render the event. You know that if you call the "renderEvent" method and set the "stick" parameter to `true`, it will keep the event on the calendar the whole time, even when the user clicks next/prev. See https://fullcalendar.io/docs/v3/renderEvent . Your description is not so clear, so I don't know for sure if that's your problem, but it sounds like it might be. – ADyson Feb 10 '20 at 09:10

0 Answers0