jQuery FullCalendar click 'next' event notificatin

10,814

Solution 1

you can use the viewDisplay trigger (http://arshaw.com/fullcalendar/docs/display/viewDisplay/) but that gets called also when the calendar loads, or the user switches views.

it sounds like you'd want an events function instead: http://arshaw.com/fullcalendar/docs/event_data/events_function/

for the asp.net thing, have you looked here? http://weblogs.asp.net/gunnarpeipman/archive/2010/02/03/using-fullcalendar-jquery-component-with-asp-net-mvc.aspx

Solution 2

Your way of approaching is wrong. You may need to write an API which returns the list of calendar objects in JSON, and use the following options.

$('#calendar').fullCalendar({
    events: '/myfeed.php'
});

Then, fullcalendar will automatically call /myfeed.php whenever it needs. e.g. If a user clicks 'prev' or 'next' month button.

Here's the example URL fullcalendar will generate :

/myfeed.php?start=1262332800&end=1265011200&_=1263178646

For more information, please visit the following URL. http://arshaw.com/fullcalendar/docs/event_data/events_json_feed/

Share:
10,814
SevenIron
Author by

SevenIron

Updated on June 05, 2022

Comments

  • SevenIron
    SevenIron almost 2 years

    How can i get notified when the user click on 'next' (arrow) ? I'm using the calendar in month view and I want to load the next month data on demand. Also, do smbdy has an example of consuming data from ASP.NET (AJAX call) ?