The rows.sort() method sorts the rows in the JavaScript Scheduler using the specified parameter.
DayPilot.Scheduler.rows.sort([spec]);
spec
(string | object) - the sort field and order to be used
The spec
value can be null | undefined - this will reset the sorting.
dp.rows.sort();
You can use a string that specifies the sort field. Ascending order will be used in this case.
dp.rows.sort("capacity");
You can use an object with field
and order
properties which specify the field name and "asc"
| "desc"
order.
dp.rows.sort({field: "capacity", order: "desc"});