timeline_cell_class
Description
Gibt die CSS-Klasse an, die auf die Zellen des Timeline-Bereichs angewendet wird
timeline_cell_class: (item: any, date: Date) => string | void;
Parameters
item- (erforderlich) Task | object - entweder das Objekt der Aufgabe oder der Ressource, das der Zeile zugewiesen istdate- (erforderlich) Date - das Datum der Zelle
Returns
text- (string | void) - eine CSS-Klasse für das betreffende Element
Example
<style>
.weekend{ background: #f4f7f4 !important;}
</style>
gantt.templates.timeline_cell_class = function(task,date){
if(date.getDay()==0||date.getDay()==6){
return "weekend";
}
};
Related samples
Details
Beachten Sie, dass Sie beim Verwenden von Arbeitszeitberechnungen isWorkTime anstelle fest codierter Werte verwenden können:
gantt.config.work_time = true;
gantt.templates.timeline_cell_class = function(task,date){
if(!gantt.isWorkTime({task:task, date:date}))
return "weekend";
};
Related API
Related Guides
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.