My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 1054: Make addMonths a public function
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Aug 2011


Sign in to add a comment
 
Reported by Knobe.St...@gmail.com, Jul 26, 2011
You have the addDays function publically accessible and I was wondering if the addMonths function could be made publically accessible as well.  This is a really handy function to use when displaying more than one month at a time.  

For example if I have 6 divs with the class of ".calendar_month" then I can write the function to create the current month and the following 5 months.  Example Code:

{{{
        $('.calendar_month').each(function(index) {
            // expensive, but fullCalendar screws with the date
            var new_date = $.fullCalendar.addMonths(new Date(), index);  
            fullcalendar_options.month = new_date.getMonth();
            fullcalendar_options.year = new_date.getFullYear();
            // Because fullcalendar removes the event attribute each time
            fullcalendar_options.events = get_student_data
            $(this).fullCalendar(fullcalendar_options);
        });
}}}

Aug 21, 2011
Project Member #1 adamrs...@gmail.com
in an upcoming version of fullcalendar i am planning on incorporating a new date library that will make this stuff easily available to the developer. (xdate on github. coming soon...)
Status: Done
Sign in to add a comment

Powered by Google Project Hosting