Bilal
Bilal

Reputation: 265

arshaw fullcalendar : disable the click event in month view and all day in agendaweek and agenda day

I want to disable the click event on all day places and want the user to be able to click just in time slots but not the allday slot.

For that: In month view : it should not be click-able, same in agendaWeek and agendaDay the top slot of allDay should not be clickable but the rest of the calendar must be fine and clickable as it is working for me.

In short allDay slot needs to be unclickable.

Upvotes: 0

Views: 7321

Answers (1)

ShadeTreeDeveloper
ShadeTreeDeveloper

Reputation: 1581

I think this is the page in the documentation you need. See my example below.

$('#calendar').fullCalendar({
    dayClick: function(date, allDay, jsEvent, view) {
        if(allDay){
            alert('That is not a valid time slot!');
            return;
        } else {
            // run your code here if a slot with valid time was selected.
        }
    }
});

Upvotes: 1

Related Questions