Fixed calendar not displaying events
This commit is contained in:
parent
946f8e3257
commit
e9fc5b28b0
@ -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() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user