DayPilot.Row.cells.totalDuration

The DayPilot.Row.cells.totalDuration() method returns the total duration of all cells in a JavaScript Scheduler row (DayPilot.Duration).

Declaration

DayPilot.Row.cells.totalDuration([filter]);

Parameters

  • filter - optional callback function that returns true for cells that should be included in the calculation (it receives the cell object as an argument); available since 2024.1.5854

Example

Calculate total duration of all cells in a row:

const total = dp.rows.find("A").cells.totalDuration();

Calculate total duration of all business cells in a row:

const total = dp.rows.find("A").cells.totalDuration(cell => cell.properties.business);