rem: selectCells(dt, idPrefix, monIndex, '_dim', '');   monIndex++;  dt = new Date(self.viewStart.getTime()); selectCells(dt, idPrefix, monIndex, '', '_dim'); 
add: if (isStartDateMonthRendered) { selectCells(dt, idPrefix, monIndex, '_dim', ''); } if (isEndDateMonthRendered) {   monIndex++;  dt = new Date(self.viewStart.getTime()); selectCells(dt, idPrefix, monIndex, '', '_dim'); } 
context:     this.renderSelection = function() {                // Sync internal start date with query start for main cal        self.syncViewStart();                var selDays = self.selectedDays;        var selDiv = null;        var dt = new Date(self.viewStart.getTime());        var crossMonth = dt.getDate() > self.controller.viewEnd.getDate();        var monIndex = self.monthMappings[dt.getMonth()];        var idPrefix = self.id + '_month';                // Bail out if viewed range of events is not in the currently        // displayed array of months        if (isNaN(monIndex)) {            return;        }                // Main function that actually does the selection work        function selectCells(dt, idPrefix, monIndex, suffA, suffB) {            var idSuffix = '';            var datIndex = 0;            var idStr = '';            var selDiv = null;            while (dt <= self.controller.viewEnd) {                idSuffix = dt.getDate() <                     self.viewStart.getDate() ? suffA : suffB;                datIndex = dt.getDate();                idStr = idPrefix + monIndex + '_day' + datIndex + idSuffix;                selDiv = document.getElementById(idStr);                selDiv.className = selDiv.className + ' miniSelected';                self.selectedDays.push(selDiv);                datIndex++;                dt.setDate(datIndex);            }        }                // Deselect selected cells if needed -- remove appended         // ' miniSelected' (space plus miniSelected) CSS class        while (selDiv = selDays.pop()) {            selDiv.className = selDiv.className.replace(' miniSelected', '');        }                // Create new selection        // ----------        // Selection spans two months -- do dim/plain, then plain/dim        if (crossMonth) {            // * First month -- actual dates and dimmed dates for next month            selectCells(dt, idPrefix, monIndex, '_dim', '');            // * Second month -- dimmed dates for previous month and actual dates            // Move to the next month            monIndex++;            // Reset working date            dt = new Date(self.viewStart.getTime());            selectCells(dt, idPrefix, monIndex, '', '_dim');        }        // Selection is all within a single month -- do plain/plain        else {            selectCells(dt, idPrefix, monIndex, '', '');        }    }
meta: 1859	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1859/32d982dde1ce4eee69289a65f10e2302ec7cb85c/minical.js/buggy/src/webapp/js/cosmo/ui/minical.js