Я добавил календарь в html используя
<div drag id='calendar'></div>
и установите событие в календарь
$(document).ready(function () {
SetCalender();
});
function SetCalender() {
var allEvents = [];
y = 2019;
m = 06;
d = 07;
allEvents.push({
title: 'event1',
start: '2019-07-07'
}, {
title: 'event2',
start: new Date(y, m, d + 1, 19, 0),
end: new Date(y, m, d + 1, 22, 30)
},
{
title: 'event3',
start: new Date(y, m, d + 1, 4, 0),
end: new Date(y, m, d + 1, 6, 30),
allDay: false,
});
$('#calendar').fullCalendar('removeEvents', function (eventObject) {
return true;
});
var calendar = $('#calendar').fullCalendar();
calendar.fullCalendar('addEventSource', allEvents);
}
Но как я могу добавить вышеупомянутые события только для чтения, что означает, что пользователь не может перетаскивать