The onTimeHeaderRightClick event handler fires when the user right-clicks a time header cell in the JavaScript Scheduler component. Set timeHeaderRightClickHandling to "Enabled" to receive this event.
DayPilot.Scheduler.onTimeHeaderRightClick(args)args.header.start (DayPilot.Date) - start of the time header cell
args.header.end (DayPilot.Date) - end of the time header cell
args.header.level (number) - header level (zero-based index)
args.preventDefault() - cancels the default action
This event fires before onTimeHeaderRightClicked. Call args.preventDefault() to cancel the default action specified by timeHeaderRightClickHandling.
JavaScript
const scheduler = new DayPilot.Scheduler("dp", {
timeHeaderRightClickHandling: "Enabled",
onTimeHeaderRightClick: (args) => {
args.preventDefault();
DayPilot.Modal.alert(args.header.start.toString());
},
// ...
});
scheduler.init();Angular
<daypilot-scheduler [config]="config"></daypilot-scheduler>config: DayPilot.SchedulerConfig = {
timeHeaderRightClickHandling: "Enabled",
onTimeHeaderRightClick: (args) => {
args.preventDefault();
DayPilot.Modal.alert(args.header.start.toString());
},
// ...
};React
<DayPilotScheduler
timeHeaderRightClickHandling="Enabled"
onTimeHeaderRightClick={onTimeHeaderRightClick}
{/* ... */}
/>const onTimeHeaderRightClick = (args) => {
args.preventDefault();
DayPilot.Modal.alert(args.header.start.toString());
};Vue
<DayPilotScheduler
timeHeaderRightClickHandling="Enabled"
@timeHeaderRightClick="onTimeHeaderRightClick"
<!-- ... -->
/>const onTimeHeaderRightClick = (args) => {
args.preventDefault();
DayPilot.Modal.alert(args.header.start.toString());
};DayPilot.Scheduler.onTimeHeaderRightClicked