Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FullCalendar resource clickable

In FullCalendar how can I make a resource clickable?

I've checked the API but I cannot see anything about that, am I missing something?

I'm after a resource-click-event as we have for events?

like image 947
TZAU Avatar asked Mar 12 '23 07:03

TZAU


1 Answers

In the resourceRender callback function you can add a click handler to the second argument.

function resourceRenderCallback(resourceObj, labelTds, bodyTds){
    labelTds.on('click', function(){console.log('click');});
}

This is obviously a very minimal function for the click but you can fill in that function with whatever you need. To match the docs more this would be closer to how they define the function

resourceRender: function(resourceObj, labelTds, bodyTds) {
    labelTds.on('click', function(){console.log('click');});
}
like image 191
Daffy13 Avatar answered May 13 '23 12:05

Daffy13