Reputation: 31
I was wondering if its possible to show a modal as you click an event in fullcalendar? Where the modal contains all the information of the event and you can edit it. I do know how to show a modal when an event is selected but I can't figure out how do you pass the events id and append it to the modal. I badly need your help, I'm still a newbie in web development so if you could show or explain how and what to do with this. :)
eventclick: function(){
$('#editevent').modal('show');
},
Upvotes: 0
Views: 4552
Reputation: 3367
You need to get the eventClick callback method, and work with the first parameter, that is the event you have click.
$('#calendar').fullCalendar({
eventClick: function(event, jsEvent, view) {
//Here you can call your method to open your modal.
//As I don't know your method, I will assume is called 'openModal', that receives an id as a parameter.
openModal(event.id);
}
});
Upvotes: 1