search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Disable right click on DayPilot Scheduler

Asked by Nirav Upadhyay
7 years ago.

I want to stop the right click event on DayPilot scheduler. Currently when a user right clicks it calls onTimeRangeSelecting but on mouse up it doesn't call the onTimeRangeSelected.
Is there any way to stop the right click event, however on left click I want both the above mentioned events.

Thanks,
Nirav

Answer posted by Dan Letecky [DayPilot]
7 years ago.

By default, timeRangeRightClickHandling is set to "ContextMenu". That means grid right click activates the context menu - but it must be set using contextMenuSelection property.

If you use timeRangeRightClickHandling="Disabled" right-clicking will be disabled.

Comment posted by Nirav Upadhyay
7 years ago.

I am using Angular2 scheduler. I do not see timeRangeRightClickHandling property/event/method or any settings on https://doc.daypilot.org/scheduler/angular-2/
Please let me know am i missing anything here.

Comment posted by Nirav Upadhyay
7 years ago.

I want to just disable the right click, however I want my onTimeRangeSelecting event as is and I am using it.
Is there any way to achieve right click disabled and left click enabled.

Comment posted by Dan Letecky [DayPilot]
7 years ago.

In Angular 2 you can simply add it to the config object:

import {Component} from '@angular/core';
import {DayPilot} from "daypilot-pro-angular";

@Component({
  selector: 'angular2-scheduler-example',
  template: `<daypilot-scheduler [config]="config"></daypilot-scheduler`
})
export class AppComponent {

  config: any = {
    // ...
    timeRangeRightClickHandling: "Disabled"
  }

}
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.