DayPilot.Row.cells.totalDuration

The 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 (function) - optional callback that receives a cell object and returns true for cells that should be included in the calculation; available since 2024.1.5854

Return Value

Returns a DayPilot.Duration object.

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);

See Also

DayPilot.Row Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript