Hello, how are you?
First of all, the 'dayClick' event is triggered when a calendar date is clicked and not a calendar event.
Another thing I noticed is that the method parameters are very different from the documentation parameters. Note: link
If your problem is an event use the 'eventClick' method.
Follow the link documentation link
Here's an example of how you can do using both the triggered event by clicking a calendar day and the triggered event by clicking a calendar event.
$('#calendar-container').fullCalendar({
header: {
left: 'prev, next today',
center: 'title',
right: 'month, basicWeek, basicDay'
},
locale: 'pt-br',
defaultDate: '2016-12-19',
navLinks: true,
editable: false,
eventLimit: true,
events: events,
dayClick: function(date, jsEvent, view){
console.log("Clicou no dia: " + date.format());
},
eventClick: function(calEvent, jsEvent, view){
console.log("Clicou no evento: " + calEvent.title);
// Marco o evento clicado
$(this).css('border-color', 'red');
if(calEvent.url){
// Ativar um modal aqui
// Cancelo o evento
return false;
}
}
});