Next: fullCalendar Database persistence

I am halfway through the chapter about persisting fullCalendar’s events in a database. Topics include:

  1. Saving events
  2. Loading events from database
  3. Modifying events
  4. Deleting events

The examples will be based on the jQuery Dialogs version of the tutorials.

The server side code cannot be very specific because there are many ways to implement the CRUD interface depending on the libraries or frameworks you use, but I will include some sample code in Python to give you an idea.

The price of the book will increase when this chapter is done.  However, current buyers will get the updates for free.  Now is the time to get the book at the current price .



Tip on serializing event in fullCalendar with JSON.stringify

When serializing a fullCalendar event with JSON.stringify() you may receive an error message like this one:

TypeError:Converting circular structure to JSON

That happens because each event has a reference to its source, which has a reference to the event itself, effectively creating a circular reference that JSON.stringify cannot manage.

The culprit is the event’s “source” property.   The way I deal with this is removing the source property before sending the event to its destination (ajax call, database CRUD function, etc):

delete event.source;