{"action":"closed","issue":{"url":"https://api.github.com/repos/rzymek/meteor-fullcalendar/issues/23","labels_url":"https://api.github.com/repos/rzymek/meteor-fullcalendar/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/rzymek/meteor-fullcalendar/issues/23/comments","events_url":"https://api.github.com/repos/rzymek/meteor-fullcalendar/issues/23/events","html_url":"https://github.com/rzymek/meteor-fullcalendar/issues/23","id":119597024,"number":23,"title":"Possible example where passing options in JS not template?","user":{"login":"andregoldstein","id":7061578,"avatar_url":"https://avatars.githubusercontent.com/u/7061578?v=3","gravatar_id":"","url":"https://api.github.com/users/andregoldstein","html_url":"https://github.com/andregoldstein","followers_url":"https://api.github.com/users/andregoldstein/followers","following_url":"https://api.github.com/users/andregoldstein/following{/other_user}","gists_url":"https://api.github.com/users/andregoldstein/gists{/gist_id}","starred_url":"https://api.github.com/users/andregoldstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andregoldstein/subscriptions","organizations_url":"https://api.github.com/users/andregoldstein/orgs","repos_url":"https://api.github.com/users/andregoldstein/repos","events_url":"https://api.github.com/users/andregoldstein/events{/privacy}","received_events_url":"https://api.github.com/users/andregoldstein/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-11-30T22:35:28Z","updated_at":"2015-12-17T20:30:29Z","closed_at":"2015-12-17T20:30:29Z","body":"Hi there, would it be possible at all to provide a very basic example where the options are passed as a helper and not directly on the html component (as per the example folder)?\r\n\r\nYou mention it in your docs but I'm having trouble getting any of the options to work (such as header). When I add them directly to the component, things seem to work but some options (such as header) I presume can only be set in JS.\r\n\r\nI'm trying to set something like this in my template:\r\n\r\n`{{>fullcalendar options=options events=events}}`\r\n\r\nbut seemingly the events will be picked up but not the options.\r\n\r\nFull JS below:\r\n\r\n```\r\nTemplate.adminLessons.helpers({\r\n  options: function() {\r\n    return {\r\n      defaultView: 'agendaWeek',\r\n      header: {\r\n        left: 'prev,next,today',\r\n        center: 'title',\r\n        right: 'agendaWeek,month,agendaDay'\r\n      }\r\n    };\r\n  },\r\n  events: function() {\r\n    var fc;\r\n    fc = $('.mainCalendar');\r\n    return function(start, end, tz, callback) {\r\n      var lessons;\r\n      Meteor.subscribe('lessons', start.toDate(), end.toDate(), function() {\r\n        return fc.fullCalendar('refetchEvents');\r\n      });\r\n      lessons = _.map(Lessons.find().fetch(), function(event) {\r\n        return {\r\n          title: event.title,\r\n          start: event.start,\r\n          end: event.end,\r\n          className: event.type,\r\n          id: event._id\r\n        };\r\n      });\r\n      return callback(lessons);\r\n    };\r\n  },\r\n  onEventClicked: function() {\r\n    return function(calEvent, jsEvent, view) {\r\n      return Router.go('adminLesson', {\r\n        _id: calEvent.id\r\n      });\r\n    };\r\n  },\r\n  onDayClicked: function() {\r\n    return function(date, jsEvent, view) {\r\n      Session.set('addingEvent', true);\r\n      $('input#title').focus();\r\n      Session.set('addingEventClass', 'active');\r\n      Session.set('addingEventDate', moment(date._d).format('YYYY-MM-DD'));\r\n      Session.set('addingEventStartTime', moment(date._d).format('HH:mm'));\r\n      return Session.set('addingEventEndTime', moment(date._d).add(1, 'hours').format('HH:mm'));\r\n    };\r\n  }\r\n});\r\n\r\nTemplate.adminLessons.rendered = function() {\r\n  var fc;\r\n  fc = this.$('.fc');\r\n  return this.autorun(function() {\r\n    Lessons.find();\r\n    return fc.fullCalendar('refetchEvents');\r\n  });\r\n};\r\n```\r\n\r\nWould be great if you could see where I'm going wrong, thanks."}}