Is it possible to limit FullCalendar-2 to add events only in slot interval and limit it to 2?
For example, users can add event only between 12:00:00 - 12:15:00, it is not possible to add longer event (12:00:00 - 12:30:00) and he can add it only if there is a 'free' slot. Orage events are correct (max 2 events in time slot), events blue are wrong (over 2 events)
Here's an example
$(document).ready(function() {
// page is now ready, initialize the calendar...
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'agendaDay'
},
defaultView: 'agendaDay',
allDaySlot: false,
scrollTime: moment().format('HH:mm:ss'),
slotDuration: '00:15:00',
minTime: '06:45:00',
maxTime: '23:15:00',
editable: true,
events: [
{
title: 'Meeting',
start: '2014-06-06T10:30:00',
end: '2014-06-06T10:45:00'
},
{
title: 'Lunch',
start: '2014-06-06T10:30:00',
end: '2014-06-06T10:45:00'
},
{
title: 'Birthday Party',
start: '2014-06-06T10:30:00',
end: '2014-06-06T10:45:00'
},
{
title: 'Meeting',
start: '2014-06-06T15:30:00',
end: '2014-06-06T15:45:00',
color: '#FF7F50'
},
{
title: 'Lunch',
start: '2014-06-06T15:30:00',
end: '2014-06-06T15:45:00',
color: '#FF7F50'
}
]
});
});
and live: http://jsbin.com/fezidowo/3/