1
votes

I am learning FullCalendar JS plugin by Adam Shaw now. And first at all I want to say "Thanks a lot" to the plugin author.

What is a Calendar view? This is a list of records (calendar events). And I have to control this list size, or I hit limits (no more than 1000 records can be passed from Controller to View).

I see two ways:

(1) Traditional Selectors above calendar ('Please select month' - and I retrieve from Database only that month records (calendar events). Good - but if to start switching months inside Calendar - the other months will be empty (have no events)...

(2) To make 'pagination' of calendar events from month to month:

2-1. If you switch months by "<>" buttons (inside Calendar section) - a page makes postback (rerender full page or rerender only calendar section by AJAX) and retrieves records of picked month.

2-2. Probably the best way: If you switch months by "<>" buttons (regardless which calendar view - day, week, month - in use) - script upload new month records by ajax/json and place them in calendar. Don't know how to do that, but i am going to read over the documentation carefully.

If you have experience how overcome this problem of fetching to many records in Calendar events - please share.

Thanks

2
Hi Guys, probably I've found what to do. Why I am passing an array of records from Controller to View, if I can parse all records to JSON string and pass to View only one variable. And no limits hit. It is not an answer for my question, but a solution for the problem.Denis Brown

2 Answers

0
votes

you are looking for gotoDate (http://arshaw.com/fullcalendar/docs/current_date/gotoDate/) which will refetch your events for the given date object or year and month.

From documentation:

.fullCalendar( 'gotoDate', year [, month, [ date ]] )