Skip to content

'view more' functionality plugin for jquery.fullcalender plugin

License

Notifications You must be signed in to change notification settings

brettfishman/fullcalendar.viewmore

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 

Repository files navigation

View More Button Plugin for FullCalendar

fullCalendar.viewMore screenshot

This code was written by Scott Greenfield of Lyconic to address issue #304.

I was looking at the list of issues for FullCalendar on Google Code, and I realized that, out of necessity for a company project, I had solved several of them. Anyway, I figured I'd start with the most "starred" enhancement, the "view more" button.

Getting Started

Dependencies (included in project download):

FullCalendar.viewMore acts as a wrapper for FullCalendar, so that you can specify a maximum number of events per day. If the events exceed the max, a 'view more' button will be added to the date box.

The simplest way of enabling the plugin is to call limitEvents on an initialized fullcalendar that has events set via a function:

$('#calendar').fullCalendar({
  editable: true,      
  events: function(start, end, callback) {
    $.ajax({
      url: '/test/get-events',
      dataType: 'json',
      success: function(data){
        callback(data);
      }
    });
  }
});

$('#calendar').limitEvents(4);

Note: To use the limitEvents plugin with a custom click event handler, do so like this:

$('#calendar').limitEvents({
  maxEvents: 3,
  viewMoreClick: function(){
    //your code here
  }
});

If you do not require the use of the formBubble overlay, and instead would like add a custom viewMoreClick handler, then this plugin becomes no longer dependent on the formBubble plugin.

That's it! The API isn't finished, and we will be expanding its capabilities in the future, but for now this does what we need.

About

'view more' functionality plugin for jquery.fullcalender plugin

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%