Bug 339509 (Lightning version) Wrong day selected in views if selected timezone does not match system timezone, patch by thomas.benisch@sun.com, r=jminta

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@198895 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jminta%gmail.com
2006-06-02 19:57:32 +00:00
parent 3313b14151
commit fb2bc51bc5

View File

@@ -61,9 +61,11 @@ function ltnMinimonthPick(minimonth)
if (gMiniMonthLoading)
return;
var jsDate = minimonth.value;
var cdt = new CalDateTime();
cdt.jsDate = minimonth.value;
cdt = cdt.getInTimezone(calendarDefaultTimezone());
cdt.year = jsDate.getFullYear();
cdt.month = jsDate.getMonth();
cdt.day = jsDate.getDate();
cdt.isDate = true;
if (document.getElementById("displayDeck").selectedPanel !=
@@ -74,6 +76,7 @@ function ltnMinimonthPick(minimonth)
// the first time they are shown.
if (!view.displayCalendar) {
showCalendarView('month');
cdt.timezone = view.timezone;
view.goToDay(cdt);
return;
}
@@ -85,6 +88,7 @@ function ltnMinimonthPick(minimonth)
showCalendarView(viewID);
}
cdt.timezone = currentView().timezone;
currentView().goToDay(cdt);
}