Prevent resize of appointment before Start Time

Hello,

I want to disable the drag drop and resize of scheduled appointments before its start time value. But for time > Start Time, resize and drag and drop should be enabled.

I tried to implement this by comparing Start Time values before and after After onActionBegin() and onDrag(). But i could not get old appointment details. Event always contains changed data.

1 Reply 1 reply marked as answer

HB Hareesh Balasubramanian Syncfusion Team May 20, 2021 04:29 PM UTC

Hi Swarupa, 

Greetings from Syncfusion Support..! 

We have prepared a sample based on your shared query “need to prevent the dragging/resizing before the StartTime of the current event” using dragStart, dragStop, resizeStart, and resizeStop events of our Scheduler, which can be viewed from the following link. 


  public onDragResizeStart(args: any): void { 
    this.startTime = args.data.StartTime; 
 
  public onDragResizeStop(args: any): void { 
    args.cancel = !(this.startTime <= args.data.StartTime); 
 

Kindly try the above solution and get back to us if you need any further assistance. 

Regards, 
Hareesh 


Marked as answer
Loader.
Up arrow icon