Basic UsageThe first step in embedding a calendar on a web page is to have the right JavaScript and CSS files.
Make sure you are including the FullCalendar stylesheet, as well as the FullCalendar and
jQuery JS files, in the
If you plan on doing dragging or resizing, you need some additional jQuery UI files (more information here). Once you have your dependencies, you need to write the JavaScript code that initializes the calendar.
This code must be executed after the page has initialized. The best way to do this is with jQuery's
The above code should be in a
An that's it, you should see a month-based calendar that has no events on it. If you want to learn how to display events, visit the Google Calendar or Event Data sections. OptionsMost of FullCalendar's documentation describes options that affect the look or behavior of the calendar. Options are usually set when the calendar is initialized, like so:
CallbacksCallbacks are sort of like options, but they are functions that get called whenever something special happens. In the following example, an alert box will appear whenever the user clicks on a day:
MethodsMethods provide ways to manipulate the calendar from JavaScript code. A method operates
on the jQuery object of a calendar that has already been initialized, using the familiar
This will call the next method and will force to the calendar to move to the next month/week/day. |