meteor - TypeError: callback is not a function -
i adding events calendar.
============this code============
events: function (start, end , callback) { var events = []; calevents=events.find(); calevents.foreach(function(evt){ events.push({ id:evt._id, title:evt.title, start:evt.date, }); }); console.log(events); callback(events); },
but in console, getting error , none of events showing on calendar.
typeerror: callback not function
if @ the docs fullcalendar, can see it's expecting third argument before callback: timezone
.
function( start, end, timezone, callback ) { }
therefore right now, code using timezone (which named callback
) function, , doesn't much. add timezone
in code shown above, , callback should work.
Comments
Post a Comment