maddhatter / laravel-fullcalendar

Laravel FullCalendar.io Helper
627 stars 267 forks source link

Access event on eventClick #60

Open xAl3xFx opened 7 years ago

xAl3xFx commented 7 years ago

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

shigawaka commented 7 years ago

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; 
ShapesGraphicStudio commented 5 years ago

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 ?