I’ve integrated the fullcalender plugin version 6.1.10 in a web application from https://fullcalendar.io/. This application is built with Laravel 10. But the fullcalender is not loaded but rather clicking on inspect or ctrl + or ctrl -. I’ve understood the fullcalender is loaded if the window size of the page is changed. Can anyone please help me?


I’ve written the following code in blade file
<div class="tab-pane fade " id="v-pills-calendar" role="tabpanel" aria-labelledby="v-pills-calendar-tab">
<!-- Your content for the Bank tab goes here -->
<div class="content">
<div class="teacherProfile-tab-five">
<div class="teacher-heading">
<h1>Calendar</h1>
</div>
<div class="calender-content">
<div class="schedule-button">
<a href="{{ route('tutor.schedule_lesson') }}"><button type="button" class="btn btn-secondary d-flex">
<p>Schedule a lesson</p>
<img src="{{ asset('webapp/assets/images/icons/carbon_add-filled.svg') }}" class="button-icon" loading="lazy" alt="add" />
</button></a>
</div>
<!-- <div id="calendar-container"></div> -->
<div id="calendar"></div>
<div class="calendar-check-boxes d-flex">
<div class="calendar-cb-one me-5">
<input class="form-check-input" type="checkbox" value="" id="onlineCheckbox" />
<label class="form-check-label" for="onlineCheckbox">
Online
</label>
</div>
<div class="calendar-cb-two">
<input class="form-check-input" type="checkbox" value="" id="inPersonCheckbox" />
<label class="form-check-label" for="inPersonCheckbox">
In person
</label>
</div>
</div>
</div>
</div>
</div>
<script>
document.addEventListener('DOMContentLoaded', function() {
let calendarEl = document.getElementById('calendar');
let calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'dayGridMonth',
initialDate: "{{ date('Y-m-d') }}",
themeSystem: "bootstrap",
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
events: [{
title: 'All Day Event',
start: '2024-02-01'
},
{
title: 'Long Event',
start: '2021-02-07',
end: '2024-02-10'
},
{
groupId: '999',
title: 'Repeating Event',
start: '2024-02-09T16:00:00'
},
{
groupId: '999',
title: 'Repeating Event',
start: '2024-02-16T16:00:00'
},
{
title: 'Conference',
start: '2024-02-11',
end: '2024-02-13'
},
{
title: 'Meeting',
start: '2021-04-12T10:30:00',
end: '2021-04-12T12:30:00'
},
{
title: 'Lunch',
start: '2021-04-12T12:00:00'
},
{
title: 'Meeting',
start: '2021-04-12T14:30:00'
},
{
title: 'Birthday Party',
start: '2021-04-13T07:00:00'
},
{
title: 'Click for Google',
url: 'http://google.com/',
start: '2024-02-24'
}
]
});
calendar.render();
});