Fullcalendar viewdisplay alternative function

I want to update my complete calendar to the latest version. everything is working. But some of the data I am fetching from the database using php. some functions create problems such as display function display. Please check the code below.

    viewDisplay: function(view) {
        if (view.name != lastView )
        {
            if (view.name == 'month') 
            {   
                    $('#meetings').fullCalendar( 'removeEventSource', '/meetings/meetinglistdays/my').fullCalendar( 'refetchEvents' );
                    $('#meetings').fullCalendar( 'addEventSource', '/meetings/meetingslistmonth/my');
            }
            else
            {
                $('#meetings').fullCalendar( 'removeEventSource', '/meetings/meetinglistdays/my' ); 
                $('#meetings').fullCalendar( 'removeEventSource', '/meetings/meetingslistmonth/my' ).fullCalendar( 'refetchEvents' );
                $('#meetings').fullCalendar( 'addEventSource', '/meetings/meetinglistdays/my' );
            }
            lastView = view.name;
        }

    },

      

+3


source to share


1 answer


I ran into a similar problem, and the reason is that functions Renamed/Removed

and viewDisplay

have been deprecated in favor of callbacks viewRender

.



Note. Before moving on to migration, you should try reading the migration

docs click here to go to the migration docs . The solution to the problem is here at the very bottom in the section Renamed/Removed

.

0


source







All Articles