maddhatter / laravel-fullcalendar

Laravel FullCalendar.io Helper
627 stars 266 forks source link

Change fullCalendar option (i.e. selectable) after click a button or use Event #128

Open azzeddine05 opened 5 years ago

azzeddine05 commented 5 years ago

hi friends my question is how c'an i disable selected just for a section all-days in fullcalendar ,but i did not succeed to get this result now i want how to set option selecteble to false after clicking in all-days section i succeded khnow if i click in the all-days using this code , now just how to change option selectable to false, this is my code

$calendar_details = Calendar::addEvents($event_list, [ //set custom color fo this event //'color' => '#800',

        ])->setOptions([ //set fullcalendar options
            'firstDay' => 1,

            'selectable' => true,
            'defaultView' => 'agendaWeek',
            'slotLabelFormat' => 'HH:mm',
            'allDay' => true,
            'minTime' => '08:00:00',
            'maxTime' => '20:00:00',
            'slotDuration' => '00:30:01',
            'locale' => 'fr',

        ])->setCallbacks([ //set fullcalendar callback options (will not be JSON encoded)
            'select' => 'function(start, end, jsEvent, view) {
                var allDay = !start.hasTime() && !end.hasTime();
                if( allDay == true)
                {
                    //here i want to chage option selectable to false

                }else{
                       alert(yes);
               }

thanks for you