I’m using the cell_class function to set up some custom CSS, but my cell class function is not getting called. My timeline view gets displayed, but the custom css class has not been added to it.
If I strip my system right back to basics and get rid of all my custom configuration options, it works, so I know that it is something that I have done wrong at my end.
scheduler.templates.location_cell_class = function(evs,x,y){
return "custom_css_class";
}
scheduler.createTimelineView({
name: "location",
section_autoheight: false,
dx:100,
dy:25,
x_unit: "day",
x_date: "%d",
x_step: 1,
x_size: 21,
x_length: 14,
y_unit:[ { key: 0, label: "" },{ key: 1, label: "USA" },{ key: 2, label: "UK" },{ key: 3, label: "Australia" } ],
y_property:"locationid",
render: "bar",
second_scale:{
x_unit: "month",
x_date: "%F" }
});
As you can see from the above snippets, when I create the timeline view I use
name: “location”,
and I create the related function via
location_cell_class
There shouldn’t be anything else neccessary in order to get the
custom_css_class
applied to the cells on the timeline view ?
Is there any config option that I could have set that would stop the scheduler.templates.location_cell_class function getting called?
I’ve got custom css classes being applied successfully in day, week and month views in my main system, and I can get custom css classes working in timeline views in a test system sepearate from my main system, so I know it’s something I have done wrong, or configured incorrectly - I just haven’t figured out what it is yet.
If there’s nothing obvious that you can suggest to me, I’ll just have to strip my whole system down line by line until I figure out what I have done wrong.