Detect click on background event

I have a Fullcalendar and am adding some background events to it. These background events are slots that cannot be clicked or dragged. Is there any way to detect this (that the user clicked on a background event)?

+5
source share
1 answer

The background event is displayed as a DIV with the class name fc-bgevent.

My code for detecting a background click event:

element.fullCalendar({ ... dayClick: function(date, jsEvent, view) { if (jsEvent.target.classList.contains('fc-bgevent')) { alert('Click Background Event Area'); } }, ... }); 
+12
source

Source: https://habr.com/ru/post/1208579/


All Articles