I'm trying to remove or hide dates / days from fullcalendar V5 for example I have these dates: 2021-09-10 and 2021-09-12 what I am trying to do is not to show the dates or events on that day.
document.addEventListener('DOMContentLoaded', function () {
var calendarEl = document.getElementById('calendar');
var MyDate = new Date(2021, 9, 10);
var calendar = new FullCalendar.Calendar(calendarEl, {
initialView: 'timeGridWeek',
locale: 'es',
headerToolbar: {
right: "timeGridWeek,timeGridDay,listWeek",
center: "title",
left: "prev,next"
},
// No muestro los fines de semana
weekends: false,
hiddenDays: [0, 6],
// Hora minima y maxima en la que se van a mostrar los eventos, con 30 minutos de separacion
timeFormat: 'H:mm',
axisFormat: 'HH:mm',
slotMinTime: '11:00',
slotMaxTime: '21:00',
dayRender: function (cell) {
MyDate.css("visibility", "hidden");
cell.css("visibility", "hidden");
},
events: [
{
url: 'alltwo.php', // use the `url` property
color: 'red',
}
],
eventSources: [
{
url: 'all.php', // use the `url` property
color: '#1c97df', // an option!
textColor: 'whitesmoke', // an option!
eventColor: '#378006',
// method: 'POST',
dataType: 'json',
}
],
});
calendar.render();
});
The code is the one I am trying to use but it would not be working.
Version FullCalendar 5.9.0