jquery-week-calendar icon indicating copy to clipboard operation
jquery-week-calendar copied to clipboard

Is there any way to Dynamically set overlapEventsSeparate per event?

Open AnderssonPeter opened this issue 8 years ago • 0 comments

Is there any way to Dynamically set overlapEventsSeparate based on two events that are overlapping?

For example with the following data it would be nice if 'Gym' would have overlapEventsSeparate: false, while the rest where true.

  var eventData = {
    events : [
       {'id':1, 'start': new Date(year, month, day, 08), 'end': new Date(year, month, day, 20),'title':'Gym'},
       {'id':2, 'start': new Date(year, month, day, 09), 'end': new Date(year, month, day, 09, 45),'title':'Gymnastics'},
       {'id':3, 'start': new Date(year, month, day, 10), 'end': new Date(year, month, day, 11),'title':'Spinning'},
       {'id':4, 'start': new Date(year, month, day, 11, 15), 'end': new Date(year, month, day, 12),'title':'Indoor Walking'},
       {'id':5, 'start': new Date(year, month, day, 11, 45), 'end': new Date(year, month, day, 12, 15),'title':'Kettlebells'}
    ]
  };

So some sort of function like seperateEvents: function (event1, event2) { /* logic here */ } and default logic could be to just return the value of overlapEventsSeparate.

The result could look something like schedule

AnderssonPeter avatar Mar 02 '17 10:03 AnderssonPeter