rem: this.monthDays=YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();this.postMonthDays=YAHOO.widget.Calendar_Core.DISPLAY_DAYS-this.preMonthDays-this.monthDays;workingDate=YAHOO.widget.DateMath.subtract(workingDate,YAHOO.widget.DateMath.DAY,this.preMonthDays);var weekRowIndex=0;for(var c=0;c<this.cells.length;++c){var cellRenderers=new Array();var cell=this.cells[c];this.clearElement(cell);cell.index=c;cell.id=this.id+"_cell"+c;this.cellDates[this.cellDates.length]=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];if(workingDate.getDay()==this.Options.START_WEEKDAY){var rowHeaderCell=null;var rowFooterCell=null;if(this.Options.SHOW_WEEK_HEADER){rowHeaderCell=this.weekHeaderCells[weekRowIndex];this.clearElement(rowHeaderCell);} if(this.Options.SHOW_WEEK_FOOTER){rowFooterCell=this.weekFooterCells[weekRowIndex];this.clearElement(rowFooterCell);} if(this.Options.HIDE_BLANK_WEEKS&&this.isDateOOM(workingDate)&&!YAHOO.widget.DateMath.isMonthOverlapWeek(workingDate)){continue;}else{if(rowHeaderCell){this.renderRowHeader(workingDate,rowHeaderCell);} if(rowFooterCell){this.renderRowFooter(workingDate,rowFooterCell);}}} var renderer=null;if(workingDate.getFullYear()==this.today.getFullYear()&&workingDate.getMonth()==this.today.getMonth()&&workingDate.getDate()==this.today.getDate()){cellRenderers[cellRenderers.length]=this.renderCellStyleToday;} if(this.isDateOOM(workingDate)){cellRenderers[cellRenderers.length]=this.renderCellNotThisMonth;}else{for(var r=0;r<this.renderStack.length;++r){var rArray=this.renderStack[r];var type=rArray[0];var month;var day;var year;switch(type){case YAHOO.widget.Calendar_Core.DATE:month=rArray[1][1];day=rArray[1][2];year=rArray[1][0];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day&&workingDate.getFullYear()==year){renderer=rArray[2];this.renderStack.splice(r,1);} break;case YAHOO.widget.Calendar_Core.MONTH_DAY:month=rArray[1][0];day=rArray[1][1];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day){renderer=rArray[2];this.renderStack.splice(r,1);} break;case YAHOO.widget.Calendar_Core.RANGE:var date1=rArray[1][0];var date2=rArray[1][1];var d1month=date1[1];var d1day=date1[2];var d1year=date1[0];var d1=new Date(d1year,d1month-1,d1day);var d2month=date2[1];var d2day=date2[2];var d2year=date2[0];var d2=new Date(d2year,d2month-1,d2day);if(workingDate.getTime()>=d1.getTime()&&workingDate.getTime()<=d2.getTime()){renderer=rArray[2];if(workingDate.getTime()==d2.getTime()){this.renderStack.splice(r,1);}} break;case YAHOO.widget.Calendar_Core.WEEKDAY:var weekday=rArray[1][0];if(workingDate.getDay()+1==weekday){renderer=rArray[2];} break;case YAHOO.widget.Calendar_Core.MONTH:month=rArray[1][0];if(workingDate.getMonth()+1==month){renderer=rArray[2];} 
add: this.monthDays=YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();this.postMonthDays=YAHOO.widget.Calendar.DISPLAY_DAYS-this.preMonthDays-this.monthDays;workingDate=YAHOO.widget.DateMath.subtract(workingDate,YAHOO.widget.DateMath.DAY,this.preMonthDays);var useDate,weekNum,weekClass;useDate=this.cfg.getProperty("pagedate");html[html.length]='<tbody class="m'+(useDate.getMonth()+1)+'">';var i=0;var tempDiv=document.createElement("div");var cell=document.createElement("td");tempDiv.appendChild(cell);var jan1=new Date(useDate.getFullYear(),0,1);var cal=this.parent||this;for(var r=0;r<6;r++){weekNum=YAHOO.widget.DateMath.getWeekNumber(workingDate,useDate.getFullYear(),startDay);weekClass="w"+weekNum;if(r!==0&&this.isDateOOM(workingDate)&&this.cfg.getProperty("HIDE_BLANK_WEEKS")===true){break;}else{html[html.length]='<tr class="'+weekClass+'">';if(this.cfg.getProperty("SHOW_WEEK_HEADER")){html=this.renderRowHeader(weekNum,html);} for(var d=0;d<7;d++){var cellRenderers=[];this.clearElement(cell);YAHOO.util.Dom.addClass(cell,"calcell");cell.id=this.id+"_cell"+i;cell.innerHTML=i;var renderer=null;if(workingDate.getFullYear()==this.today.getFullYear()&&workingDate.getMonth()==this.today.getMonth()&&workingDate.getDate()==this.today.getDate()){cellRenderers[cellRenderers.length]=cal.renderCellStyleToday;} this.cellDates[this.cellDates.length]=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];if(this.isDateOOM(workingDate)){cellRenderers[cellRenderers.length]=cal.renderCellNotThisMonth;}else{YAHOO.util.Dom.addClass(cell,"wd"+workingDate.getDay());YAHOO.util.Dom.addClass(cell,"d"+workingDate.getDate());for(var s=0;s<this.renderStack.length;++s){var rArray=this.renderStack[s];var type=rArray[0];var month;var day;var year;switch(type){case YAHOO.widget.Calendar.DATE:month=rArray[1][1];day=rArray[1][2];year=rArray[1][0];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day&&workingDate.getFullYear()==year){renderer=rArray[2];this.renderStack.splice(s,1);} break;case YAHOO.widget.Calendar.MONTH_DAY:month=rArray[1][0];day=rArray[1][1];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day){renderer=rArray[2];this.renderStack.splice(s,1);} break;case YAHOO.widget.Calendar.RANGE:var date1=rArray[1][0];var date2=rArray[1][1];var d1month=date1[1];var d1day=date1[2];var d1year=date1[0];var d1=new Date(d1year,d1month-1,d1day);var d2month=date2[1];var d2day=date2[2];var d2year=date2[0];var d2=new Date(d2year,d2month-1,d2day);if(workingDate.getTime()>=d1.getTime()&&workingDate.getTime()<=d2.getTime()){renderer=rArray[2];if(workingDate.getTime()==d2.getTime()){this.renderStack.splice(s,1);}} break;case YAHOO.widget.Calendar.WEEKDAY:var weekday=rArray[1][0];if(workingDate.getDay()+1==weekday){renderer=rArray[2];} break;case YAHOO.widget.Calendar.MONTH:month=rArray[1][0];if(workingDate.getMonth()+1==month){renderer=rArray[2];} 
context: this.resetRenderers();this.cellDates.length=0;var workingDate=YAHOO.widget.DateMath.findMonthStart(this.pageDate);this.renderHeader();this.renderBody(workingDate);this.renderFooter();this.onRender();};YAHOO.widget.Calendar_Core.prototype.renderHeader=function(){this.headerCell.innerHTML="";var headerContainer=document.createElement("DIV");headerContainer.className=this.Style.CSS_HEADER;headerContainer.appendChild(document.createTextNode(this.buildMonthLabel()));this.headerCell.appendChild(headerContainer);};YAHOO.widget.Calendar_Core.prototype.renderBody=function(workingDate){this.preMonthDays=workingDate.getDay();if(this.Options.START_WEEKDAY>0){this.preMonthDays-=this.Options.START_WEEKDAY;}if(this.preMonthDays<0){this.preMonthDays+=7;}this.monthDays=YAHOO.widget.DateMath.findMonthEnd(workingDate).getDate();this.postMonthDays=YAHOO.widget.Calendar_Core.DISPLAY_DAYS-this.preMonthDays-this.monthDays;workingDate=YAHOO.widget.DateMath.subtract(workingDate,YAHOO.widget.DateMath.DAY,this.preMonthDays);var weekRowIndex=0;for(var c=0;c<this.cells.length;++c){var cellRenderers=new Array();var cell=this.cells[c];this.clearElement(cell);cell.index=c;cell.id=this.id+"_cell"+c;this.cellDates[this.cellDates.length]=[workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()];if(workingDate.getDay()==this.Options.START_WEEKDAY){var rowHeaderCell=null;var rowFooterCell=null;if(this.Options.SHOW_WEEK_HEADER){rowHeaderCell=this.weekHeaderCells[weekRowIndex];this.clearElement(rowHeaderCell);}if(this.Options.SHOW_WEEK_FOOTER){rowFooterCell=this.weekFooterCells[weekRowIndex];this.clearElement(rowFooterCell);}if(this.Options.HIDE_BLANK_WEEKS&&this.isDateOOM(workingDate)&&!YAHOO.widget.DateMath.isMonthOverlapWeek(workingDate)){continue;}else{if(rowHeaderCell){this.renderRowHeader(workingDate,rowHeaderCell);}if(rowFooterCell){this.renderRowFooter(workingDate,rowFooterCell);}}}var renderer=null;if(workingDate.getFullYear()==this.today.getFullYear()&&workingDate.getMonth()==this.today.getMonth()&&workingDate.getDate()==this.today.getDate()){cellRenderers[cellRenderers.length]=this.renderCellStyleToday;}if(this.isDateOOM(workingDate)){cellRenderers[cellRenderers.length]=this.renderCellNotThisMonth;}else{for(var r=0;r<this.renderStack.length;++r){var rArray=this.renderStack[r];var type=rArray[0];var month;var day;var year;switch(type){case YAHOO.widget.Calendar_Core.DATE:month=rArray[1][1];day=rArray[1][2];year=rArray[1][0];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day&&workingDate.getFullYear()==year){renderer=rArray[2];this.renderStack.splice(r,1);}break;case YAHOO.widget.Calendar_Core.MONTH_DAY:month=rArray[1][0];day=rArray[1][1];if(workingDate.getMonth()+1==month&&workingDate.getDate()==day){renderer=rArray[2];this.renderStack.splice(r,1);}break;case YAHOO.widget.Calendar_Core.RANGE:var date1=rArray[1][0];var date2=rArray[1][1];var d1month=date1[1];var d1day=date1[2];var d1year=date1[0];var d1=new Date(d1year,d1month-1,d1day);var d2month=date2[1];var d2day=date2[2];var d2year=date2[0];var d2=new Date(d2year,d2month-1,d2day);if(workingDate.getTime()>=d1.getTime()&&workingDate.getTime()<=d2.getTime()){renderer=rArray[2];if(workingDate.getTime()==d2.getTime()){this.renderStack.splice(r,1);}}break;case YAHOO.widget.Calendar_Core.WEEKDAY:var weekday=rArray[1][0];if(workingDate.getDay()+1==weekday){renderer=rArray[2];}break;case YAHOO.widget.Calendar_Core.MONTH:month=rArray[1][0];if(workingDate.getMonth()+1==month){renderer=rArray[2];}break;}if(renderer){cellRenderers[cellRenderers.length]=renderer;}}}if(this._indexOfSelectedFieldArray([workingDate.getFullYear(),workingDate.getMonth()+1,workingDate.getDate()])>-1){cellRenderers[cellRenderers.length]=this.renderCellStyleSelected;}if(this.minDate){this.minDate=YAHOO.widget.DateMath.clearTime(this.minDate);}if(this.maxDate){this.maxDate=YAHOO.widget.DateMath.clearTime(this.maxDate);}if((this.minDate&&(workingDate.getTime()<this.minDate.getTime()))||(this.maxDate&&(workingDate.getTime()>this.maxDate.getTime()))){cellRenderers[cellRenderers.length]=this.renderOutOfBoundsDate;}else{cellRenderers[cellRenderers.length]=this.renderCellDefault;}for(var x=0;x<cellRenderers.length;++x){var ren=cellRenderers[x];if(ren.call(this,workingDate,cell)==YAHOO.widget.Calendar_Core.STOP_RENDER){break;}}workingDate=YAHOO.widget.DateMath.add(workingDate,YAHOO.widget.DateMath.DAY,1);if(workingDate.getDay()==this.Options.START_WEEKDAY){weekRowIndex+=1;}YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL);if(c>=0&&c<=6){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_TOP);}if((c%7)==0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_LEFT);}if(((c+1)%7)==0){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_RIGHT);}var postDays=this.postMonthDays;if(postDays>=7&&this.Options.HIDE_BLANK_WEEKS){var blankWeeks=Math.floor(postDays/7);for(var p=0;p<blankWeeks;++p){postDays-=7;}}if(c>=((this.preMonthDays+postDays+this.monthDays)-7)){YAHOO.util.Dom.addClass(cell,this.Style.CSS_CELL_BOTTOM);}}};YAHOO.widget.Calendar_Core.prototype.renderFooter=function(){};YAHOO.widget.Calendar_Core.prototype._unload=function(e,cal){for(var c in cal.cells){c=null;}
meta: 4707	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4707/50c3492c4c3c825dbd3401e134a19ed46799c456/calendar-min.js/buggy/www/resources/yui/calendar/calendar-min.js