The getCoords() method returns information about the current mouse cursor position relative to the Scheduler grid.
Available since 2019.2.3817.
DayPilot.Scheduler.getCoords()Returns an object with the following properties:
x (number) - horizontal position in pixels
y (number) - vertical position in pixels
grid (string) - grid name that indicates the main grid or frozen rows ("main" | "top" | "bottom"); available in DayPilot Pro
time (DayPilot.Date object) - current position in the timeline
row (DayPilot.Row object) - current row
cell (object) - current grid cell; available in DayPilot Pro
event (DayPilot.Event object) - if the mouse cursor is on an event, it holds the event object; available in DayPilot Pro
eventOffset (object with x, y properties) - if the mouse cursor is on an event, it holds the relative coordinates in pixels; available in DayPilot Pro
Returns null if the current position cannot be read, for example when the mouse cursor is outside of the grid.
const dp = new DayPilot.Scheduler("dp", {
// ...
});
dp.init();
const coords = dp.getCoords();Frozen Rows [doc.daypilot.org]