Wednesday, October 3, 2012

JQuery FullCalendar The Basics


As this topic is too big for one post it will be a series on the FullCalendar project.  If you have not seen this control or visited the project site please go to http://arshaw.com/fullcalendar/ to get the details.

Getting started:

Beginning to use FullCalendar is really easy.  The most basic setup looks like this:


 
By default FullCalendar will cover the width of the browser so I put in a style of width:800px just to narrow it down a bit.  At first you have just a basic calendar on the page with no way to add or display events.  To allow editing on the calendar add the following code to the function:

 
The code will take you to the day view and allow you select a time range to “edit”.  But I forgot one step.  You need to format the calendar so that you can move back to the month view when you want.  To do this you would add the following code:

  
It will look like this on the page:

 
 
If you wanted to take the spaces out between month, week and day you would format the code to look like this:
 


This renders the calendar as:

 

 

In the next article I will show you how to add events to the calendar and methods for editing events with JQuery Dialog.