maddhatter / laravel-fullcalendar

Laravel FullCalendar.io Helper
627 stars 267 forks source link

How can I set html id of calendar #98

Open mjawaids opened 6 years ago

mjawaids commented 6 years ago

How can I set html id of calendar, not event. So, I can access the calendar in javascript via #calendar selector. I want to access it so I can call the $('#calendar').fullCalendar('render'); in javascript.

magnosis commented 6 years ago

I have the same question.

It does get a unique, constant class of "fc" so there's that. As for the ID, it seems to be dynamically assigned, e.g. #calendar-reFWTY7b". Can we provide our own ID instead, for convenience?

magnosis commented 6 years ago

If you look at the Calendar.php implementation, it does provide

public function getId()

I hope this helps.