Display jQuery FullCalendar plugin view like Codeigniter Calendar

I integrated jQuery fullcalendar plugin in Codeigniter, just because the Codeigniter Calendar library don't have an option to show week view.

It works well but I have some problems. For example, when it shows November 2011 month, it also shows October 31 2011 (and event if available). For each month/week, I have to calculate some amount (revenue by month/week) and show it. But, this way, the amount is not right because some days of others month are included.

Is there any solution to consider only days of the current month (1 to 31) that the calendar show ?

Or is there a solution to display Codeigniter Calendar in week view ?


No- there is no direct method in the calendar to distinguish this,

but using jQuery you can traverse the table.. because that is what is a, with lots of classes.

If you inspect the the months of the other months yo shall notice they have an idientifier class of

fc-other-month

Using jQuery each function you can make determine what month you are looking at and calculate what ever you need.

$('.fc-grid').each(function(){ 
 if (($this).hasClass('fc-other-month') 
   { //do for other month }
  else
   {//do for the rest, but you might have to match another element here}
});

jQuery, making client side scripting easy peasy....

链接地址: http://www.djcxy.com/p/81180.html

上一篇: FullCalendar在两个月内展示活动?

下一篇: 显示类似Codeigniter日历的jQuery FullCalendar插件视图