I am trying to implement a scheduler calendar that gets the details of an appointment on double click. So I have this method EventRendered to add Event Listener for doubleclick.
It goes to the method customClick when double click is fired, it says that the this.scheduleObj is undefined
@ViewChild('scheduleObj')
public scheduleObj: ScheduleComponent;
public onEventRendered(args: EventRenderedArgs){
args.element.addEventListener('dblclick', this.customClick);
}
public customClick(apptDetails) {
// You can write a code for new functionality to event click here
if (apptDetails.detail === 2) {
let eventObj: ATIAppointment;
let resource: ResourceDetails
if (apptDetails && apptDetails.currentTarget.classList.contains('e-appointment')) {
const a = this.scheduleObj.getEventDetails(apptDetails.currentTarget) //as ATIAppointment;
}
}
}