This question is similar to https://forums.daypilot.org/question/3743/typescript-cant-find-property-makedraggable, however, now applied to the Calendar component.
I am working with the implementation which can be downloaded from the following page: https://code.daypilot.org/72781/angular-work-order-scheduling-php-mysql.
Now I am trying to change the Scheduler to a Calendar view. This seems to work for all basic components.
In scheduler.component.ts, I am importing DayPilotCalendarComponent:
import {DayPilot, DayPilotCalendarComponent, DayPilotSchedulerComponent} from "daypilot-pro-angular";
and adjusted the HTML template:
<daypilot-calendar [config]="config" [events]="events" #scheduler></daypilot-calendar>
<!-- <daypilot-scheduler [config]="config" [events]="events" #scheduler></daypilot-scheduler>-->
This leads to a change from Scheduler to Calender (with the different functionalities correctly working).
However, adjusting the following code to enable the method makeDraggable for Calender (https://api.daypilot.org/daypilot-calendar-makedraggable/):
@Directive({ selector: '[draggableToScheduler]' })
export class DraggableDirective implements AfterViewInit {
@Input('draggableToScheduler') options: any;
constructor(private el: ElementRef) { }
ngAfterViewInit(): void {
this.options.element = this.el.nativeElement;
// DayPilot.Scheduler.makeDraggable(this.options);
DayPilot.Calendar.makeDraggable(this.options);
}
}
leads to the following error: error TS2339: Property 'makeDraggable' does not exist on type 'typeof Calendar'.
Could it be that I am missing an import of the Calendar component somewhere?