and here it is:
import { Directive, ElementRef, Input, AfterViewInit } from '@angular/core';
import { DayPilot } from 'daypilot-pro-angular';
@Directive({ selector: '[makeDraggable]' })
export class ScheduleMakeDraggableDirective implements AfterViewInit {
@Input('makeDraggable') options: any;
constructor(private el: ElementRef) { }
ngAfterViewInit(): void {
this.options.element = this.el.nativeElement;
DayPilot.Scheduler['makeDraggable'](this.options);
}
}
example usage in template :
<div [makeDraggable]="{ text: 'foobar', duration: 3600*24, id: 42 }">Draggable Event</div>