Error in processing dates in FullCalendar.io script

26 views Asked by At

I have added the following html and script to an html page, which I have taken from another question here on StackOverflow.

    <link href="https://cdn.jsdelivr.net/npm/[email protected]/main.min.css" rel="stylesheet" />
    <script src='https://cdn.jsdelivr.net/npm/[email protected]/index.global.min.js'></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/ical.js/1.4.0/ical.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/main.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/locales-all.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@fullcalendar/[email protected]/main.global.min.js">
    </script>

    <script>
    document.addEventListener("DOMContentLoaded", function () {
    var calendarEl = document.getElementById("calendar");
 
    var calendar = new FullCalendar.Calendar(calendarEl, {
     initialView: "dayGridMonth",
     headerToolbar: {
       left: "prev,next today",
       center: "title",
       right: "dayGridMonth,timeGridWeek,timeGridDay",
     },
     //plugins: [DayGridPlugin, iCalendarPlugin],
     events: {
       url: "x.ics",
       format: "ics",
     },
     });
 
     calendar.render();
     });
     </script>

The calendar renders fine but the dates do not, with this error showing in the console:

main.global.min.js:6 Unable to process item in calendar: Error: invalid date-time value: "2024-02-17T::"

Does anybody have any ideas? I do not understand the plugins if that has anything to do with this.

I was expecting or hoping dates would show up on the calendar.

0

There are 0 answers