It looks like I'm not able to reproduce the issue using the latest sandbox build. Please see the following demo:
https://javascript.daypilot.org/sandbox/scheduler/eventmenu.html
There is a link below the Scheduler that opens a context menu manually:
Context menu:
var manualMenu = new DayPilot.Menu({
items: [
{text:"Show event ID", onClick: function(args) {alert("ID: " + args.source.id);} },
]
});
Link:
<a href='javascript:manualMenu.show({id: "test-id"})'>Manual context menu</a>
Can you please give it a try?
Please note that it uses the new "onClick" event handler (instead of the legacy "onclick") which uses "args" parameter.
Let me know if the problem persists with the latest sandbox build (2018.3.3366).