firing event-click for bg events
See original GitHub issueOriginally reported on Google Code with ID 2543
In some cases it's useful to detect clicks on background events (not currently supported).
The small fix is divided into two parts;
1) Make sure we connect the seg to the fillSeg by fc-seg data in renderFillSegEls()
in Grid.js, just like we do for ordinary event segs. [1 line added]
2) Detect click events on .fc-bgevent-container elements and trigger bgEventClick in
a new bindBgSegHandlers method. [1 line + 1 method added]
We could extend the bindSegHandlers method to support bg events too, but the new method
felt cleaner since we don't want to resize the background events.
Example;
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
defaultView: 'agendaWeek',
bgEventClick: function(calEvent, jsEvent, view) {
alert(calEvent.title);
},
...
});
Reported by matiasnu
on 2015-07-07 11:12:47
Imported with 1 stars.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:9
- Comments:11 (8 by maintainers)
Top Results From Across the Web
fullCalendar eventClick not fired - Stack Overflow
I'm using fullcalendar in an app. I want to change cell background color by clicking on cell, but ...
Read more >MouseEvent - Web APIs | MDN
Chrome Edge
MouseEvent Full support. Chrome1. Toggle history Full support. Edge12. To...
MouseEvent() constructor Full support. Chrome26. Toggle history Full support. Edge12. To...
altKey Full support....
Read more >chart.events.click | highcharts API Reference
Fires when clicking on the plot background. One parameter, event , is passed to the function, containing common event information. Information on the...
Read more >HTML Button onclick – JavaScript Click Event Tutorial
Buttons, on the other hand, are usually manipulated by JavaScript events so they can trigger certain functionality. In this tutorial, we are ...
Read more >popover events doesn't trigger eventClick function on ...
following is our LWC implementation. HTML Code : <template> <div style="background:#ffffff;" class="slds-grid" > <div class ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am using the v4 latest release till date but still, it is not firing for background event @arshaw my event data is as follows
{“id”:314.51044554580886, “title”:“blocked”, “start”:“2019-04-13T09:00:00+05:00”, “end”:“2019-04-14T08:00:00+05:00”, “event_source”:“custom”, “allDay”:false, “color”:“gray”, “rendering”:“background”}
and event click code is as follows: eventClick: function (info) { debugger info.jsEvent.preventDefault(); } above thing works for normal event but not for background event
@arshaw, Is it possible to implement this feature in short term? It will be very useful for simple booking/blocking system.