Bug 1304102 - No events shown in Multiweek view [TypeError: dayStart.clone is not a function]. r=philipp a=jorgk
authorStefan Sitter <ssitter@gmail.com>
Tue, 20 Sep 2016 21:52:08 +0200
changeset 27575 158ba2f893428f25646959041ece0f57e5fb335d
parent 27574 5c9ac0ad74d55a01a0187e8f3bada6bbcd3874e8
child 27576 312ee6460a1ec9895f6a723316ad189cb3dd671c
push id1850
push userclokep@gmail.com
push dateWed, 08 Mar 2017 19:29:12 +0000
treeherdercomm-esr52@028df196b2d9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp, jorgk
bugs1304102
Bug 1304102 - No events shown in Multiweek view [TypeError: dayStart.clone is not a function]. r=philipp a=jorgk MozReview-Commit-ID: LY3v6aorpwO
calendar/base/content/calendar-views.xml
--- a/calendar/base/content/calendar-views.xml
+++ b/calendar/base/content/calendar-views.xml
@@ -181,20 +181,20 @@
           // without changing the start and end of the view.
           if (aDate) {
               aDate = aDate.getInTimezone(this.timezone);
               // Get the first date that should be shown. This is the
               // start of the week of the day that we're centering around
               // adjusted for the day the week starts on and the number
               // of previous weeks we're supposed to display.
               let dayStart = cal.getWeekInfoService().getStartOfWeek(aDate);
-              dayStart -= 7 * Preferences.get("calendar.previousweeks.inview", 0);
+              dayStart.day -= 7 * Preferences.get("calendar.previousweeks.inview", 0);
               // The last day we're supposed to show
               let dayEnd = dayStart.clone();
-              dayEnd += (7 * this.mWeeksInView) - 1;
+              dayEnd.day += (7 * this.mWeeksInView) - 1;
               this.setDateRange(dayStart, dayEnd);
               this.selectedDay = aDate;
           } else {
               this.refresh();
           }
         ]]></body>
       </method>