Full calendar, events are stepped on

0

Hello a question some way so that the events are not walked on?

my code to show the events is this:

events: function (start, end, timezone, callback) {
  var user = $('#iduser').val();
  $.get('horario/' + user, function (data) {
    var events = [];
    $.each(data, function (index, subcatObj) {
      events.push({
        start: subcatObj.start_date,
        end: subcatObj.end_date,
        color: 'red',
        title: 'Cerrado',
        dow: [subcatObj.dow],
        id: subcatObj.idhorario_cancha
      });
    });
    callback(events);
  });
},
    
asked by Juan Jose 21.01.2018 в 00:24
source

2 answers

1

It is a property of the calendar itself, the property slotEventOverlap allows you to prevent events from being stepped on each other but this implementation implies that some events are reduced when shown.

By default this property is activated, it is necessary to put it in false to get the functionality you want.

It is also worth mentioning that this property only works in the views agendaWeek and agendaDay .

The implementation of this property must be done in the call to the calendar:

$('#calendario').fullCalendar({
  slotEventOverlap: false
});
    
answered by 21.01.2018 в 01:09
-2

I could solve it, the code I used was the following:

selectOverlap:false,
    
answered by 21.01.2018 в 01:32