The onTimeHeaderRightClick event is fired for right mouse button clicks on time header cells. The timeHeaderRightClickHandling must be set to "Enabled".
DayPilot.Scheduler.onTimeHeaderClick(args)