I am halfway through the chapter about persisting fullCalendar’s events in a database. Topics include:
- Saving events
- Loading events from database
- Modifying events
- 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 .
Use these callbacks in fullCalendar to respond when:
- Event’s content is about to be rendered: eventRender
- Event is clicked: eventClick
- Event is resized: eventResize
- Event finished been dragged and dropped: eventDrop
- Event is already dropped and rendered: eventReceive
- Event stopped been dragged, but still not dropped: eventDragStop
Added a new chapter to the book: “Drag and Drop External Events”.
The sample project was previewed in a past post. Here is the animation of the final result:
As mentioned in the previous book update, the price has been changed to $9.99. As with early adopters, all buyers will continue to receive free updates.
With each new chapter the price will go up, so you should take advantage of the current price.
Added a chapter on how to use jQuery dialogs to create, modify and remove events from the calendar. The source package includes jQueryUI and its CSS so the samples can run out of the box.
This upgrade is free if you already purchased the book. If not, learn more about it and decide if it will be useful to you.
After the next chapter the price will change to $9.99 ($2 increase). Take advantage of the early adopters price.
I just did for a client’s project something like what is shown in the following animation:
I will include the code and explanations in the book in the following days.
Sometime in the next two weeks I will raise the introductory price a little to account for the increase in advanced material. Meanwhile you can still get the book at the early adopters price.
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):
This is for a client’s project but I will include it in the book:
The events adopt the color of external events dropped on the calendar and adjust their duration according to a custom “data-*” attribute of the dropped element.
More about the book …