From 58d04d08c2de78b93574b0eb4e93aeaf6908698d Mon Sep 17 00:00:00 2001 From: "mvl%exedo.nl" Date: Tue, 2 Aug 2005 15:05:05 +0000 Subject: [PATCH] Set the date before the month, or else events might not show up on the 31th. bug 302891, patch by jminta, r=mvl git-svn-id: svn://10.0.0.236/trunk@176979 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/calendar/resources/content/dayView.js | 8 ++++---- mozilla/calendar/resources/content/monthView.js | 4 ++-- mozilla/calendar/resources/content/multiweekView.js | 4 ++-- mozilla/calendar/resources/content/weekView.js | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mozilla/calendar/resources/content/dayView.js b/mozilla/calendar/resources/content/dayView.js index d384cce1157..beb8d1edfe9 100644 --- a/mozilla/calendar/resources/content/dayView.js +++ b/mozilla/calendar/resources/content/dayView.js @@ -356,12 +356,12 @@ DayView.prototype.addToDisplayList = function(itemOccurrence, startDate, endDate //startDate.jsDate is not var adjustedStartDate = new Date(); var adjustedEndDate = new Date(); - adjustedStartDate.setFullYear(startDate.year); - adjustedStartDate.setMonth(startDate.month); adjustedStartDate.setDate(startDate.day); - adjustedEndDate.setFullYear(endDate.year); - adjustedEndDate.setMonth(endDate.month); + adjustedStartDate.setMonth(startDate.month); + adjustedStartDate.setFullYear(startDate.year); adjustedEndDate.setDate(endDate.day); + adjustedEndDate.setMonth(endDate.month); + adjustedEndDate.setFullYear(endDate.year); // Check if the event is within the bounds of events to be displayed. if ((adjustedEndDate < this.displayStartDate) || diff --git a/mozilla/calendar/resources/content/monthView.js b/mozilla/calendar/resources/content/monthView.js index fa03480ebd2..ffb42f0dadc 100644 --- a/mozilla/calendar/resources/content/monthView.js +++ b/mozilla/calendar/resources/content/monthView.js @@ -325,9 +325,9 @@ MonthView.prototype.createEventBoxInternal = function(itemOccurrence, startDate, //This is a HACK because startDate and indexOfDate don't get along well //in terms of timezones. var adjustedDate = new Date(); - adjustedDate.setFullYear(startDate.year); - adjustedDate.setMonth(startDate.month); adjustedDate.setDate(startDate.day); + adjustedDate.setMonth(startDate.month); + adjustedDate.setFullYear(startDate.year); dayBoxItem = this.dayBoxItemArray[this.indexOfDate(adjustedDate)]; if (!dayBoxItem) return; diff --git a/mozilla/calendar/resources/content/multiweekView.js b/mozilla/calendar/resources/content/multiweekView.js index 69568f60c3e..4a8cdc32f35 100644 --- a/mozilla/calendar/resources/content/multiweekView.js +++ b/mozilla/calendar/resources/content/multiweekView.js @@ -342,9 +342,9 @@ MultiweekView.prototype.createEventBoxInternal = function multiweekView_createEv //This is a HACK because startDate and indexOfDate don't get along well //in terms of timezones. var adjustedDate = new Date(); - adjustedDate.setFullYear(startDate.year); - adjustedDate.setMonth(startDate.month); adjustedDate.setDate(startDate.day); + adjustedDate.setMonth(startDate.month); + adjustedDate.setFullYear(startDate.year); var DisplayDate = new Date(adjustedDate); dayBoxItem = this.dayBoxItemArray[this.indexOfDate(DisplayDate)]; // Check if the day is visible diff --git a/mozilla/calendar/resources/content/weekView.js b/mozilla/calendar/resources/content/weekView.js index 9b81b5c388b..7445ae0a527 100644 --- a/mozilla/calendar/resources/content/weekView.js +++ b/mozilla/calendar/resources/content/weekView.js @@ -375,12 +375,12 @@ WeekView.prototype.createEventBoxInternal = function (event) //event.start.jsDate is not! var adjustedStartDate = new Date(); var adjustedEndDate = new Date(); - adjustedStartDate.setFullYear(startDate.year); - adjustedStartDate.setMonth(startDate.month); adjustedStartDate.setDate(startDate.day); - adjustedEndDate.setFullYear(endDate.year); - adjustedEndDate.setMonth(endDate.month); + adjustedStartDate.setMonth(startDate.month); + adjustedStartDate.setFullYear(startDate.year); adjustedEndDate.setDate(endDate.day); + adjustedEndDate.setMonth(endDate.month); + adjustedEndDate.setFullYear(endDate.year); // Check if the event is within the bounds of events to be displayed. if ((adjustedEndDate < this.displayStartDate) ||