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

Drag and drop event disable based minutes

Hi Team,
                            We need  Drag and drop event disable based in hours +minutes .
                               Example:09:45-17:30  (Disable drog and drop in between time)

5 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team November 9, 2016 01:27 PM UTC

Hi Rajiv,      
    
Thank you for contacting Syncfusion support.      
    
We have prepared the sample to disable drag and drop based on hours and minute.  In a sample, drag and drop is disabled, when an appointment is drag and dropped on May 7 10:35 AM to 3:45 PM interval.    
    
    
Regards,    
Karthigeyan    



RA rajivgandhi November 11, 2016 05:15 AM UTC

Hi Team,

                                                Drag and drop based on cell time    


function DragDrop(args)
{
if(args.cell.starttime.getTIme()=1234345566)
{
args.cancel=true;
}
}


KK Karthigeyan Krishnamurthi Syncfusion Team November 14, 2016 12:39 PM UTC

Hi Rajiv,   
 
Thanks for your update. 
 
In dragStop event, cell related information can’t be retrieved. Therefore, we request you to follow the suggestion provided in our previous update to prevent an appointment drag and drop functionality on specific time range. 
 
Regards, 
Karthigeyan 



RA rajivgandhi November 16, 2016 03:04 PM UTC

Hi Team,
var FetchForGriddatasJsonFull=[{StHours:9,StMinuites:30,EtHours:10,EtMinuites:30},{StHours:12,StMinuites:30,EtHours:14,EtMinuites:30}];
      function OnDragStop(args) {
        
        for (var j=0;j<FetchForGriddatasJsonFull.length;j++)
           {
       var srtTime = new Date(args.appointment.StartTime).setHours(FetchForGriddatasJsonFull[j].StHours,FetchForGriddatasJsonFull[j].StMinuites,0);
var endTime = new Date(args.appointment.EndTime).setHours(FetchForGriddatasJsonFull[j].EtHours,FetchForGriddatasJsonFull[j].EtMinuites,0);
           if(args.appointment.StartTime.getTime()>=srtTime &&  args.appointment.StartTime.getTime()>=endTime )
{
              args.cancel=false;
}
else
{
  args.cancel=true;
}
           }
        }
this is my query i want disable partcular in between timings only Drag and drop hide


KK Karthigeyan Krishnamurthi Syncfusion Team November 17, 2016 01:31 PM UTC

 
Thanks for your update. 
 
We were unclear about your last update, kindly share some more information which clearly depicts your requirement. In our previous update we provided the solution to prevent the drag and drop functionality in a particular time range (for example 10.30 AM - 3.30 PM), kindly confirm whether your requirement is similar to that or not? Information provided will be helpful for us to serve you better. 
 
Regards, 
Karthigeyan 
  


Loader.
Up arrow icon