d3k4y:reactive-fullcalendar

v3.1.1Published 7 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Based on http://fullcalendar.io/ v3.0.1 - JQuery plugin packaged for Meteor 1.0.

Amongst other improvements, version 3 of Fullcalendar includes support for list views of events and drops support for IE 8.

For the complete list of changes in version 3, visit the releases page: https://github.com/fullcalendar/fullcalendar/releases

Installation

    meteor add d3k4y:reactive-fullcalendar

Usage

Template:

    <template name="myTemplate">
        {{ > ReactiveFullcalendar options=calendarOptions }}
    </template>

Client JS:

1    Template.myTemplate.helpers({
2        calendarOptions: {
3            // Standard fullcalendar options
4            height: 700,
5            hiddenDays: [ 0 ],
6            slotDuration: '01:00:00',
7            minTime: '08:00:00',
8            maxTime: '19:00:00',
9            lang: 'fr',
10            // Function providing events reactive computation for fullcalendar plugin
11            events: function(start, end, timezone, callback) {
12                console.log(start.format(), end.format());
13                // Get events from the CalendarEvents collection
14                // return as an array with .fetch()
15                var events = CalendarEvents.find({
16                     "id"         : "calendar1",
17                     "startValue" : { $gte: start.valueOf() },
18                     "endValue"   : { $lte: end.valueOf() }
19                }).fetch();
20                callback(events);
21            },
22            // Optional: id of the calendar
23            id: "calendar1",
24            // Optional: Additional classes to apply to the calendar
25            addedClasses: "col-md-8",
26            // Optional: Additional functions to apply after each reactive events computation
27            autoruns: [
28                function () {
29                    console.log("user defined autorun function executed!");
30                }
31            ]
32        },
33    });

More details

  • Many fullcalendar can be added on the same page by using different id
  • autoruns need to be an array of functions

History

  • This package was originally written by gquemart and is available at:

https://github.com/gquemart/meteor-reactive-fullcalendar

  • It was later forked by fermuch and is available at:

https://github.com/fermuch/meteor-reactive-fullcalendar

  • And then later forked by koretech:

https://github.com/koretech/meteor-reactive-fullcalendar

  • And then later forked by projik:

https://github.com/projik/reactive-fullcalendar

  • And then later forked by d3k4y:

https://github.com/d3k4y/reactive-fullcalendar