dayClick Fullcalendar

Asked

Viewed 572 times

5

You can avoid opening the prompt(modal) insertion of new event to the click on in a day on the monthView? I managed to make it go to the date clicked on agendaWeek but he keeps opening the prompt for insertion of new event.

CODE:

dayClick: function(date, jsEvent, view){
    //não abrir o prompt de inserção
    //no caso eu quero apenas que vá para a agendaWeek na data clicada
    $("#calendar").fullCalendar('changeView','agendaWeek');
    $("#calendar").fullCalendar('gotoDate',date);
}

1 answer

3


I got the answer here.

What happens is that I have to check, at dayClick time if the current view is 'Month' and make the prompt open if it is not.

select: function(start, end) {
    if($('#calendar').fullCalendar('getView').type != 'month'){
        //ele somente entra para cadastrar se a view não for a 'month'.
    }
    else{
        //se for a 'month view' ele passa pelo if e entra neste else, alterando entao a view para agendaWeek e, portanto, nao abrindo o prompt de inserção
        $("#calendar").fullCalendar('changeView','agendaWeek');
    }
}
  • post a piece of code and not just link :D

  • 1

    Okay, edited out!!!!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.