$('#calendar').mobiscroll().eventcalendar({
dragToCreate: true,
dragToMove: true,
dragToResize: true,
invalidateEvent: 'strict',
invalid: [
{
recurring: {
repeat: 'weekly',
weekDays: 'SA,SU'
}
}, {
start: '2026-04-19T00:00',
end: '2026-04-20T00:00',
title: 'Team offsite',
allDay: true
}, {
start: '2026-04-26T00:00',
end: '2026-04-27T00:00',
title: 'Team offsite',
allDay: true
}
],
onEventCreateFailed: function () {
mobiscroll.toast({
message: 'Can\'t create event on this date'
});
},
onEventUpdateFailed: function () {
mobiscroll.toast({
message: 'Can\'t add event on this date'
});
}
});