In my project, I want to highlight the day that a job (section) starts so that events can be added from that date.
addMarkedTimeSpan is adding adding lots of extra rendering time to the UI which is noticeable if I add/remove it.
I am loading around 100 sections at a time, each with a marked time span and 2 or 3 events.
$.each(model, function (index, job) {
sections.push({
key: parseInt(job.id),
label: job.customer.name + '<br>' + job.street + ' ' + job.city + ' ' + job.state + ' ' + job.post_code
});
scheduler.addMarkedTimespan({
start_date: moment(job.start_date).toDate(),
end_date: moment(job.start_date).add('d', 1).toDate(),
css: 'start_date',
sections: {
timeline: job.id
},
html: 'START'
})
$.each(job.work_items, function (index, workItem) {
events.push({
// event properties
});
});
});
scheduler.updateCollection('jobs', sections);
scheduler.parse(events, 'json');