Ember wrapper for jQuery FullCalendar plugin.
npm install --save-dev ember-cli-full-calendar
ember g full-calendar
To send actions to the calendar, register it with the controller.
// app/controllers/application.js
export default Ember.Controller.extend({
accessToFullCalendar: null,
actions: {
prev: function() {
this.get('accessToFullCalendar').send('prev');
}
}
});
// app/routes/application.js
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return {
events: Ember.A([{
title: "Hackathon", start: Date.now()
}])
};
}
});
// app/controllers/application.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
eventClick(event, jsEvent, view){
console.log(`${event.title} was clicked!`)
// Prints: Hackathon was clicked!
},
//other callbacks omitted
}
});
// ember-cli-build.js
module.exports = function(defaults) {
var app = ...
// Complete list of lanugages:
// https://github.com/fullcalendar/fullcalendar/tree/master/dist/lang
app.import('bower_components/fullcalendar/dist/lang/es.js');
};
Available under the MIT License.