We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

DragAndDrop doesn't work

How do I enable drag and drop features of the Schedule?

I have tried enabling it in the html with : [allowDragAndDrop]='true' but this results in: "Can't bind to 'allowDragAndDrop' since it isn't a known property of 'ejs-schedule' " 

As explained here: https://help.syncfusion.com/angular/schedule/working-with-appointments#drag-and-drop

1 Reply

KK Karthigeyan Krishnamurthi Syncfusion Team November 1, 2018 04:47 AM UTC

Hi Sybren 
  
Thank you for contacting Syncfusion support. 
 
In EJ2 Schedule, drag and drop feature will be enabled only if the corresponding module DragAndDropService is injected in ts file. We have prepared the below sample for your reference, kindly refer it. 
 
import { ViewEncapsulation, Component, OnInit } from '@angular/core'; 
import { 
    EventSettingsModel, DayService, WeekService, WorkWeekService, MonthService, 
    AgendaService, ResizeService, DragAndDropService 
} from '@syncfusion/ej2-angular-schedule'; 
import { resourceData } from './datasource'; 
@Component({ 
    selector: 'app-root', 
    templateUrl: './app.component.html', 
    providers: [DayService, WeekService, WorkWeekService, MonthService, AgendaService,ResizeService, DragAndDropService], 
    encapsulation: ViewEncapsulation.None 
}) 
export class AppComponent implements OnInit { 
    public selectedDate: Date = new Date(2018, 3, 1); 
    public eventSettings: EventSettingsModel = { dataSource: resourceData }; 
    ngOnInit(): void { 
 
    } 
} 
 
Shared UG link is related to EJ1 and kindly refer the below EJ2 UG and online sample links.  
 
Note: Currently UG enhancement for new features (including resize and drag-drop) is in progress and it will be refreshed in online as soon as possible. 
 
Regards, 
Karthigeyan 


Loader.
Live Chat Icon For mobile
Up arrow icon