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

How to avoid avoid scheduling overlapped appointments

Hi Support:

We need to avoid our user to create new appointments that overlap their existing appointments.  

For example: suppose that a user has an appointment for tomorrow between 2:00pm and 5:00pm.

Then he wants to add a new appointment from 1:00 pm thru 3:00pm or from 4:00 pm thru 6:00 pm.  How can we add some kind of validation to avoid creating the last entry.

Appreciate any advise to achieve that.

Thanks in advanced

David



3 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team August 23, 2017 11:18 AM UTC

Hi David 
  
Thank you for contacting Syncfusion support. 
 
We have prepared the sample to prevent the rendering of an appointment with in another appointment range which can be viewed from the below link. 
 
<Code> 
beforeAppointmentCreate: "OnBeforeAppointmentCreate" 
 
function OnBeforeAppointmentCreate(args) { 
    if (ej.isNullOrUndefined(args.appointment[0])) 
        app = args.appointment; 
    else 
        app = args.appointment[0];                      
       overlapList = this._overlapApp(app["AppTaskId"], app[this._appointmentSettings["startTime"]], app[this._appointmentSettings["endTime"]], ""); 
   if (overlapList.length>0) 
     args.cancel = true; 
} 
</Code> 

Note: Above sample is made in JS platform for your reference. 

Regards,
Karthigeyan  





DS dsapo August 23, 2017 11:46 PM UTC

Hi Karthigeyan:

Thanks for for help.  As usual an excellent support from you and your team. 

David









KK Karthigeyan Krishnamurthi Syncfusion Team August 24, 2017 04:18 AM UTC

Hi David, 
 
We are happy that our solution has fulfilled your requirement. 
 
Regards, 
Karthigeyan 



Loader.
Up arrow icon