In my FullCalendar I have configured 2 simple listeners: eventMouseover and eventClick. eventClick works fine. eventMouseover doesn't work. Any reaction. No alert is triggered and nothing appears on console log. Fullcalendar 4.0.2; JQuery 3.3.1; Bootstrap 4.3.1;

I have tried with different web browsers with no result.

New test: i made an even simpler test. I used only the fullcalandar zip file provided (https://github.com/fullcalendar/fullcalendar/releases) for old version 3.10 and current version 4.0.2. In one of the demo html files in the directory, i added my 2 listeners (eventClick and eventMouseover) like in the code above. Each listener make a simple console.log(). For version 3.10: the 2 listeners work fine. For version 4.0.2: eventClick work fine and eventMouseover DOESN'T WORK.

document.addEventListener('DOMContentLoaded', function () {
    var calendarEl = document.getElementById('calendar');
    var calendar = new FullCalendar.Calendar(calendarEl, {
        plugins: ['interaction', 'dayGrid', 'timeGrid', 'list'],
        locale: 'fr',
        header: {
            left: 'prev,next today',
            center: 'title',
            right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek'
        },
        defaultDate: '2019-04-12',
        navLinks: true, // can click day/week names to navigate views

        weekNumbers: true,
        weekNumbersWithinDays: true,
        weekNumberCalculation: 'ISO',
        editable: true,
        eventLimit: true, // allow "more" link when too many events
        events: [
            {
                id: 1,
                title: 'All Day Event',
                start: '2019-04-01'
            },
            {
                id: 2,
                title: 'Long Event',
                start: '2019-04-07',
                end: '2019-04-10',
                textColor: 'orange'
            },
            {
                id: 11,
                title: 'Dinner 2',
                start: '2019-04-12T22:00:00'
            },
            {
                id: 16,
                title: 'Grand ménage',
                start: '2019-04-18',
                end: '2019-04-20'
            }
        ],
        eventClick: function (event_data) {
            console.log('Clic');
            alert('Clic: ' + event_data.event.id);
        },
        eventMouseover: function (event_data) {
            console.log('Mouse over.');
            alert('Mouse over.');
        }

    });
    calendar.render();
});

1 Answers

0
maxime On

Solved: With Fullcalandar v4, there is no more eventMouseover. It's replaced by 2 new listeners: eventMouseEnter and eventMouseLeave that works fine.