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