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

How can i add the header option?

Open venturacodes opened this issue 8 years ago • 2 comments

First of all your repo is amazing @maddhatter, thank you so much for your contribution, loving to use it. So here is the deal, in FullCalendar.io, we have a way to use a header that is mostly for navigation

https://fullcalendar.io/js/fullcalendar-3.4.0/demos/basic-views.html

How can we do this with this repo?

tried to add in setOptions like this:

    $calendar = \Calendar::addEvents($events, ['color'=>'#800'])->setOptions([ //set fullcalendar options
        'header'=>['left'=>'prev, next today', 'center'=>'title', 'right'=>'month, basicWeek, basicDay'],
        'firstDay' => 1,
        'editable' => true,
        'navLinks' => true
    ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)
        'viewRender' => 'function() {}'
    ]);

Thanks man and keep up with the good work, best regards!

venturacodes avatar Aug 30 '17 01:08 venturacodes

Hi were you able to solve this issue ?

jatinkumar09 avatar Oct 09 '17 09:10 jatinkumar09

Hi Guys , If you want to add more button to header. Just go to vendor/madhatter/src/madhatter/Calendar.php and you can find line:30

`protected $defaultOptions = [ 'header' => [

        'left' => 'prev,next today listMonth',
        'center' => 'title',
        'right' => 'listMonth',
    ],`

Hope it helps. Cheers.

erenergul avatar Dec 28 '17 14:12 erenergul