#17835 closed defect (fixed)
dojo gantt chart - last month year number is not proper
Reported by: | manju | Owned by: | JayZ(zhouxiang) |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8.7 |
Component: | Dojox | Version: | 1.9.3 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Dojo gantt chart
- last month displaying with next years date (December 2012 showing as December 2013)
- year number is not matching with current year number.
Change History (9)
comment:1 Changed 6 years ago by
Component: | General → Dojox |
---|---|
Owner: | set to JayZ(zhouxiang) |
Status: | new → assigned |
comment:2 Changed 6 years ago by
comment:4 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
The issus seems to be in https://github.com/dojo/dojox/blob/1.9.3/gantt/GanttChart.js#L782 and https://github.com/dojo/dojox/blob/1.9.3/gantt/GanttChart.js#L851 (copy of same code), where it loops through the days and checks if it's a new month. If it is, a new month column is created.
The problem is that when the month changes from December to January, the year will also change, so the code
lastYear = date.getFullYear();
will give you the wrong year.