laravel-fullcalendar icon indicating copy to clipboard operation
laravel-fullcalendar copied to clipboard

Access event on eventClick

Open xAl3xFx opened this issue 8 years ago • 2 comments

How do i access the event's title for example?

xAl3xFx avatar Dec 20 '16 23:12 xAl3xFx

for reference:

 $calendar = \Calendar::addEvents($events) //add an array with addEvents
                    ->setOptions([ //set fullcalendar options
                        'firstDay' => 1
                    ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)
                        'eventClick' => 'function(event) { 
                            title= event.title; 

shigawaka avatar Dec 21 '16 09:12 shigawaka

Hello, Sorry for discussing an old thread. How can I get the title in the modal ?

I know I can do: $('#modalTitle').html(event.title);

And display it with: <h4 id="modalTitle" class="modal-title"></h4>

But I would like to call it as a php $variable like: $title = event.title;

Is that possible ?

ShapesGraphicStudio avatar Sep 30 '19 13:09 ShapesGraphicStudio