зеркало из https://github.com/mozilla/pjs.git
Bug 321560 Wrong day selected in Sunbird when using minimonth or datepicker r=mvl
This commit is contained in:
Родитель
5703cefa32
Коммит
2ce0719adb
|
@ -120,6 +120,8 @@
|
|||
var viewElement = document.getAnonymousElementByAttribute(this, "anonid", "view-element");
|
||||
viewElement.tasksInView = this.mTasksInView;
|
||||
|
||||
aDate = aDate.getInTimezone(viewElement.timezone);
|
||||
|
||||
viewElement.showDate(aDate);
|
||||
|
||||
if (this.mWorkdaysOnly) {
|
||||
|
|
|
@ -134,6 +134,8 @@
|
|||
viewElement.showFullMonth = false;
|
||||
viewElement.tasksInView = this.mTasksInView;
|
||||
|
||||
aDate = aDate.getInTimezone(viewElement.timezone);
|
||||
|
||||
// Set up the preferences we're going to need to read
|
||||
var prefService = Components.classes[
|
||||
"@mozilla.org/preferences-service;1"]
|
||||
|
@ -158,7 +160,7 @@
|
|||
if (this.mWorkdaysOnly) {
|
||||
this.removeNonWorkdays();
|
||||
}
|
||||
viewElement.selectedDay = aDate.getInTimezone(viewElement.timezone);
|
||||
viewElement.selectedDay = aDate;
|
||||
this.setNavLabels(aDate);
|
||||
]]></body>
|
||||
</method>
|
||||
|
|
|
@ -155,6 +155,8 @@
|
|||
var viewElement = document.getAnonymousElementByAttribute(this, "anonid", "view-element");
|
||||
viewElement.tasksInView = this.mTasksInView;
|
||||
|
||||
aDate = aDate.getInTimezone(viewElement.timezone);
|
||||
|
||||
var d1 = aDate.startOfWeek.clone();
|
||||
var d2 = aDate.endOfWeek.clone();
|
||||
|
||||
|
@ -175,7 +177,7 @@
|
|||
|
||||
document.getAnonymousElementByAttribute(this, "anonid", "view-element").setDateRange(d1, d2);
|
||||
|
||||
viewElement.selectedDay = aDate.getInTimezone(viewElement.timezone);
|
||||
viewElement.selectedDay = aDate;
|
||||
if (this.mWorkdaysOnly) {
|
||||
this.removeNonWorkdays();
|
||||
}
|
||||
|
|
|
@ -647,6 +647,8 @@
|
|||
<method name="showDate">
|
||||
<parameter name="aDate"/>
|
||||
<body><![CDATA[
|
||||
aDate = aDate.getInTimezone(this.mTimezone);
|
||||
|
||||
// We might need to do some adjusting here to make sure we still
|
||||
// display whole month even with alternative week-start days
|
||||
var startDate = aDate.startOfMonth;
|
||||
|
@ -662,7 +664,7 @@
|
|||
}
|
||||
|
||||
this.setDateRange(startDate, endDate);
|
||||
this.selectedDay = aDate.getInTimezone(this.mTimezone);
|
||||
this.selectedDay = aDate;
|
||||
]]></body>
|
||||
</method>
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче