Fixed calendar not displaying events

This commit is contained in:
Kenneth Jao 2016-08-10 18:13:08 -04:00
parent 946f8e3257
commit e9fc5b28b0

View File

@ -151,20 +151,18 @@ Template.main.helpers({
}; };
}, },
calendarOptions() { calendarOptions() {
var cursor = work.find({});
var donelist = [];
cursor.forEach(function(current) {
backgroundColor = calendarColors[current.type];
title = current.name;
duedate = current.dueDate.toISOString().slice(0,10);
donelist.push({start: duedate, title: title, backgroundColor: backgroundColor});
});
return { return {
height: window.innerHeight *.8, height: window.innerHeight *.8,
events: function() { events: donelist
var cursor = work.find({});
var donelist = [];
cursor.forEach(function(current) {
backgroundColor = calendarColors[current.type];
title = current.name;
duedate = current.dueDate.toISOString().slice(0,10);
donelist.push({start: duedate, title: title, backgroundColor: backgroundColor});
});
console.log(donelist);
return donelist;
}
}; };
}, },
calCenter() { calCenter() {