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 acellobject and returnstruefor 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
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot