I have a one-scale schedule displaying the dates. I wish for each day-cell in the scale to contain the class “foo”.
However, when using the method {timeline}_scalex_class, and specifying the class “foo” - “foo” is added twice to my header element
scheduler.plugins({
timeline: true
});
var sections = [{ key: 1, label: 'James Smith' }];
scheduler.createTimelineView({
name: 'timeline',
x_unit: 'minute',
x_date: '%H:%i',
x_step: 30,
x_size: 24,
x_start: 16,
x_length: 48,
y_unit: sections,
y_property: 'section_id',
render: 'bar'
});
scheduler.init('scheduler_here', new Date(2022, 5, 30), 'timeline');
scheduler.parse([
{ start_date: '2022-06-30 09:00', end_date: '2022-06-30 12:00', text: 'Task A-12458', section_id: 1 },
{ start_date: '2022-06-30 10:00', end_date: '2022-06-30 16:00', text: 'Task A-89411', section_id: 1 },
{ start_date: '2022-06-30 10:00', end_date: '2022-06-30 14:00', text: 'Task A-64168', section_id: 1 },
{ start_date: '2022-06-30 16:00', end_date: '2022-06-30 17:00', text: 'Task A-46598', section_id: 1 }
]);
scheduler.templates.timeline_scalex_class = function (date) {
return 'foo';
};
When inspecting the DOM one gets:
13:30
Where the "foo" class is specified twice
Is there any simple way of only getting the class added once, i.e. to get
13:30
?