Author: akushunin
Date: 2007-10-04 03:04:23 -0400 (Thu, 04 Oct 2007)
New Revision: 3246
Modified:
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
RF-1031
Modified:
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
---
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-04
07:01:05 UTC (rev 3245)
+++
branches/3.1.x/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-10-04
07:04:23 UTC (rev 3246)
@@ -941,13 +941,16 @@
if (this.daysData &&
this.daysData.index[currentYear+'-'+currentMonth]!=undefined)
{
var idx = this.daysData.index[currentYear+'-'+currentMonth];
- var firstDay = this.daysData.days[idx].day;
- while (dayCounter<firstDay)
+ if (this.daysData.startDate.getFullYear()==currentYear &&
this.daysData.startDate.getMonth()==currentMonth)
{
- this.days.push({day:dayCounter, isWeekend:this.isWeekend(p%7), _month:month});
+ var firstDay = firstDay=(this.daysData.days[idx].day ? this.daysData.days[idx].day :
this.daysData.startDate.getDate());
+ while (dayCounter<firstDay)
+ {
+ this.days.push({day:dayCounter, isWeekend:this.isWeekend(p%7), _month:month});
- dayCounter++;
- p++;
+ dayCounter++;
+ p++;
+ }
}
var len = this.daysData.days.length;