This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 157810 - Calendar control will not display for February, 2009
Summary: Calendar control will not display for February, 2009
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: _ potingwu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-02 20:58 UTC by javakcl
Modified: 2009-02-02 21:05 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description javakcl 2009-02-02 20:58:53 UTC
There appears to be a flaw in the calendar.js in the defaulttheme.jar file such that since February 2009 started on a
Sunday, ends on a Saturday, and has exactly 4 weeks in the month, the calendar fails for a Javascript error in function
ui_Calendar_redrawCalendar on a null reference to this.lastRow.  Below is the snippet that fails with the specific line
denoted by "--->":

if(linkNum < 35) {
        counter = 1;
        while(linkNum < 35) {
            link = document.getElementById(this.dateLinkId + linkNum);
            link.className = this.edgeClass; 
            link.innerHTML = counter;
            link.title = this.formatDate(first.getMonth() + 2, counter, 
                first.getFullYear());
            linkNum++;
            counter++;
        }
--->    this.lastRow.style.display = "none";
    } else if(linkNum == 35) {
        this.lastRow.style.display = "none";
    } else {
        counter = 1;
        while(linkNum < 42) {
            link = document.getElementById(this.dateLinkId + linkNum);
            link.className = this.edgeClass; 
            link.innerHTML = counter;
            link.title = this.formatDate(first.getMonth() + 2, counter, 
                first.getFullYear());
            linkNum++;
            counter++;
        }
        this.lastRow.style.display = "";
    }


This has been tested to fail on both a windows box and a linux box, both running tomcat 5.5.27 with JDK 1.6.0_11.