Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Vineetha Thomas on Dec 02, 2009 21:45
open dhtmlx forum
Having more than one event in same period of time.

Hii

I am using dhtmlxscheduler. In that it supports the functionality of having more than one event in same period of time.

I would like to add a confirmation box in this scenario. So please tell me the section of code where you allow this functionality

so that i would be able to add my requirement.

Thank You
Vineetha Thomas
Answer posted by Alex (support) on Dec 03, 2009 02:10

Hello,

scheduler already provides ability to create several events in the same period of time. Could you please provide more details ?

Answer posted by Vineetha Thomas on Dec 03, 2009 05:10
Hi

Actually I need to display a confirmation message (eg are you sure to create more event on the same time slot?) if the user create a new event on a time interval were there already exists an event
how can I do this in the dhtmlscheduler

Answer posted by Alex (support) on Dec 03, 2009 06:03

You can try to use onEventAdded event and delete the new event if isn't confirmed. For example:

scheduler.attachEvent("onEventAdded", function(event_id,event_object){

  var events = scheduler.getEvents(event_object.start_date,event_object.end_date);
  if(events.length>1 && !confirm("the event already exists. Do you want to add the new event ?")) scheduler.deleteEvent(event_id);
   
});