The cells.findXy() method finds Scheduler cells by their grid coordinates (indexes, not pixels).
Declaration
DayPilot.Scheduler.cells.findXy(x, y)
DayPilot.Scheduler.cells.findXy(coordinates)Parameters
x(number) - horizontal cell index, starting at 0 in the upper-left cornery(number) - vertical cell index, starting at 0 in the upper-left cornercoordinates(array) - an array of coordinate objects, for example[{x: 0, y: 0}, {x: 0, y: 1}]
Return Value
Returns an array of matching cells. The returned collection exposes helper methods that modify all cells in the array:
addClass(className)- adds a CSS class to all matched cellsremoveClass(className)- removes a CSS class from all matched cellshtml(string)- sets the HTML content of all matched cells
Example
Writes test HTML to the cell in the upper-left corner:
dp.cells.findXy(0, 0).html("test");See Also
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot