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.
Declaration
DayPilot.Scheduler.onTimeHeaderRightClick(args)Parameters
args.header.start(DayPilot.Date) - start of the time header cellargs.header.end(DayPilot.Date) - end of the time header cellargs.header.level(number) - header level (zero-based index)args.preventDefault()- cancels the default action
Notes
This event fires before onTimeHeaderRightClicked. Call args.preventDefault() to cancel the default action specified by timeHeaderRightClickHandling.
Examples
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());
};See Also
DayPilot.Scheduler.onTimeHeaderRightClicked
DayPilot.Scheduler.timeHeaderRightClickHandling
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot