var calendar;
document.addEventListener('DOMContentLoaded', function() {
var Calendar = FullCalendar.Calendar;
var calendarEl = document.getElementById('calendar');
calendar = new Calendar(calendarEl, {
plugins: [ 'interaction', 'dayGrid', 'timeGrid' ],
header: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
editable: true,
dateClick: function() {
alert('a day has been clicked!');
}
});
calendar.render();
});
function test() {
calendar.refetchEvents();
}
$('#reportrange').daterangepicker({
startDate: start,
endDate: end,
ranges: {
'Сегодня': [moment(), moment()],
'Вчера': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
'Последние 7 дней': [moment().subtract(6, 'days'), moment()],
'Последние 30 дней': [moment().subtract(29, 'days'), moment()],
'Этот месяц': [moment().startOf('month'), moment().endOf('month')],
'Прошлый месяц': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
},
...