问题
I'm using the newest version of FullCalendar. The documentation for dayClick
states that my callback should run any time a day on the calendar is clicked. Currently, clicking on any part of the calendar does not fire the callback.
//Once the document is loaded...
$(document).ready(function() {
$("#calendar").fullCalendar({
dayClick : function(date, jsEvent, view) {
alert("You clicked me");
}
});
});
The code above is basically a copy of the example case on this page.
I'm debugging my code in netbeans, and no errors are showing up in the console. All source files seem to be loaded properly.
I'm linking with jQuery 2.1.4 and moment 2.10.6. FullCalendar does not specify which version to use, so this might be the problem. However, I'm not sure what version would solve the broken callback firing.
If there's any shortcut to what I'm actually trying to do, I want dayClick to fire on right clicking the day. I can set my own callback to run when the calendar div is right-clicked, but then translating the resultant event message into a useful day object would mean I'm basically re-implementing FullCalendar's code myself.
来源:https://stackoverflow.com/questions/33111686/fullcalendar-dayclick-callback-not-firing