Try using a function that returns an array instead, and do a loop inside there.
$('#calendar').fullCalendar({
editable: true,
events: function(){
var arr = [];
for(var i = 0; i <= 10; i++){
arr.push({
title: 'All Day Event',
start: new Date(y,m,i)
});
}
return arr;
}() // <-- Here we execute the function, so it evaluates as an array.
});
1
solved Jquery with while loop error [closed]