Hi,
Can you check what’s wrong with this data. I don’t understand why its not repeating in the calendar.
This is the data that are not repeating.
var data = [
{event_id:55,start_date:new Date(2014,3,31,0,0), end_date:new Date(2014,3,31,2,0),text:"New event 2",rec_type:"day_1___#no",event_length:2*60*60},
{event_id:54,start_date:new Date(2014,3,31,0,0), end_date:new Date(2014,3,31,2,0),text:"New event",rec_type:"day_1___#no",event_length:2*60*60},
{event_id:56,start_date:new Date(2014,3,11,8,0), end_date:new Date(2014,3,11,10,0),text:"Test Repeat",rec_type:"day_1___#no",event_length:2*60*60}
];
compare to this data. This data is repeating.
var data = [
{event_id:1,start_date: new Date(2014,2,17,2,0), end_date:new Date(2014,4,17,2,0),text:"test",rec_type:"day_1___#no",event_length: 2*60*60,test:{id:1,test:'testa'}},
{event_id:2,start_date: new Date(2014,5,17,2,0), end_date:new Date(2014,6,17,2,0),text:"testw",rec_type:"day_1___#no",event_length: 2*60*60,test:{id:2,test:'testb'}},
{event_id:3,start_date: new Date(2014,2,10,2,0), end_date:new Date(2014,2,10,4,0),text:"test non-recurring",rec_type:null,event_length: null, test:{id:3,test:'testc'}}
];
I used this to render the data in the calendar. the first data are not working while the second data is working fine. What’s wrong with the first one?
for (var key in data) {
if (data.hasOwnProperty(key)) {
var val = data[key];
scheduler.addEvent({
event_id:val.event_id,
start_date: val.start_date,//start date of the series
end_date: val.end_date,//end date of the series
text: val.text,
rec_type: val.rec_type,
event_length: val.event_length,//duration of the single event, is seconds
event_pid: val.event_pid
});
}
}
Thanks