Scott Selby
Scott Selby

Reputation: 9570

jquery fullcalendar plugin view more then 1 month at a time

I am using the fullcalendar plugin and would like to change it a little bit - I want the default to be month view , but able to scroll down and continue into the next month, does anyone know if there is an add on , or anyway to start going about editing the fullcalendar?

Upvotes: 7

Views: 3843

Answers (2)

NoelHunter
NoelHunter

Reputation: 996

You could accomplish as follows:

  1. Download the data and save the JSON in local storage or an array
  2. Create 2-3 divs for 2-3 calendars
  3. Load full calendar onto the divs-- setting the start date for each
  4. Keep the same data source for all

Like this:

Multiple FullCalendars on a single page

with options

Upvotes: 1

Ganesh Bora
Ganesh Bora

Reputation: 1153

There is no direct way in fullcalendar to show two months. for your requirement you need to merge fullcalnder with darepicker ahow one small datepicker above the fullcaleder and one click of datepicker call goto methode of fullcalendar to jump at requried date.

$(document).ready(function()
{     
    $("#datepicker" ).datepicker({

        numberOfMonths: 2,
        showButtonPanel: false,
        minDate:0,

        onSelect: function(dateText, inst) 
        {  
            selected_date = dateText;
            $('#calendar').fullCalendar('gotoDate',new Date(Date.parse(selected_date)));
        }
    });

});  

Upvotes: 1

Related Questions