The current mouse position offset (relative to the event upper-left corner) is stored in dps.eventOffset property.
Example (context menu)
The following code show the relative mouse coordinates after the context menu item is clicked:
<DayPilot:MenuItem Action="JavaScript" JavaScript="alert('x:' + dps.eventOffset.x + ' y:' + dps.eventOffset.y + ' resource:' + e.row());" Text="Mouse offset (relative to event)" />
Calculating the time offset
In order to get the time position that was clicked, you should use a simple calculation involving e.start() as event start position, dps.cellDuration and dps.cellWidth.
Example
var x = dps.eventOffset.x; var time = e.start().addMinutes(x/dps.cellWidth * dps.cellDuration);
Please note that such a simple calculation only works for continuous timeline (no columns are hidden using ShowNonBusiness="false").
Controls: Scheduler