fullcalendario extends the event object from json events

According to documentation here, https://fullcalendar.io/docs/event-object

You can get those details in object as below. it works for me.

    document.addEventListener('DOMContentLoaded', function () {
        var calendarEl = document.getElementById('calendar');
        var calendar = new FullCalendar.Calendar(calendarEl, {
            initialView: 'dayGridMonth',
            events: [{
                "id": "436969", "title": "Practice", "start": "2020-10-31T22:29:00", "end": "2020-10-31T22:40:00", "someField": "the field"
                { "id": "955138", "title": "Practice", "start": "2020-10-31T03:15:00", "end": "2020-10-31T04:15:00", "someField": "the field" },
                { "id": "985289", "title": "Practice", "start": "2020-11-02T17:37:00", "end": "2020-11-02T17:42:00", "someField": "the field" }],

            eventColor: 'yellow',
            eventTextColor: 'black',
            eventClick: function (info) {                
                alert('Event: ' + info.event.extendedProps["someField"]);
            eventRender: function (event, element) {
<script src="https://cdn.jsdelivr.net/npm/[email protected]/main.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/main.css" rel="stylesheet"/>
<div id='calendar'></div>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top