Sticky drag and drop times

Is it possible to have the drag operation only stick to a particular increment? I would like to be able to have my drag and drop behavior stick to the nearest 30 min mark, because it is quite hard to actually get it to stick to something that makes sense (usually end up with a few minutes over or under). 

1 Reply

DY Deivaselvan Y Syncfusion Team August 30, 2018 05:25 PM UTC

Hi Mark, 

Thank you for contacting Syncfusion support.

We have checked with the provided information. In SfSchedule, you can customize the drop time of the dragging appointment using DropTime property of AppointmentDropEventArgs in AppointmentDrop event. Kindly refer the below code snippet and sample below. 

Code snippet: 
 
        schedule.AppointmentDrop += Schedule_AppointmentDrop;  
        …  
  
        private void Schedule_AppointmentDrop(object sender, AppointmentDropEventArgs e)  
        {  
            e.DropTime = new DateTime(e.DropTime.Year, e.DropTime.Month, e.DropTime.Day, e.DropTime.Hour, 30, 0);  
        }  
  
Sample: Sample  
  
Please let us know if you need further assistance on this.  
  
Regards,
Deivaselvan
 
 


Loader.
Up arrow icon