tags:

views:

471

answers:

1

Does anyone know if the current version of the JQuery FullCalendar plugin ver 1.1 support event add/delete/update?

I need to load the calendar with events from the db in an asp.net mvc app, allow the user to add/change/delete events, then persist any changes back to the db.

Is this doable?

Thanks for any feedback!

+1  A: 

The jQuery FullCalendar plugin does not have add/delete/update capabilities. However, this is how I would go about providing that functionality using MVC:

  • Create a controller action that returns the calendar information from the db as an array of CalEvent objects
  • Create a view and associated controller action for "adding" calendar events, with fields for the start/end dates, title, etc., using the date as a parameter.
  • Create a controller action for Editing events using the EventId or date as a parameter. You can probably reuse the same view used for "adding".
  • In the options for creating the Calendar, add a handler for the dayClick() event to be used for Adding new Calendar Events. Add the handler for the eventClick() event to be used for editing or deleting existing events.
  • Redirect to the add/edit views when dayClick() or eventClick() are called respectively and then redirect back to the calendar after updating the database. If the first item was done correctly, the calendar would reflect the additions/edits or deletions.
Jose Basilio