Bug 1558599 - Fix "Tasks in View" and "Show Completed Tasks". r=mkmelin
authorPaul Morris <paul@paulwmorris.com>
Mon, 24 Jun 2019 17:01:02 -0400
changeset 36006 a9eca82028203e39962bebea90631ab0470cd3d0
parent 36005 f0df11ad8ffaac7c7bad10c71f061971b9946894
child 36007 fe454c1cff8402bde8a5b625a977aeef95f54217
push id392
push userclokep@gmail.com
push dateMon, 02 Sep 2019 20:17:19 +0000
reviewersmkmelin
bugs1558599
Bug 1558599 - Fix "Tasks in View" and "Show Completed Tasks". r=mkmelin When the current calendar view was "Month", these two menu items (under View / Calendar / Current View in the appmenu and the main View menu) were not working. The date argument was undefined. This problem was caused by some refactoring that went awry during de-xbl of calendar views.
calendar/base/content/calendar-views.js
--- a/calendar/base/content/calendar-views.js
+++ b/calendar/base/content/calendar-views.js
@@ -261,19 +261,17 @@
 
         get observerID() {
             return "month-view-observer";
         }
 
         goToDay(date) {
             this.displayDaysOff = !this.mWorkdaysOnly;
 
-            const dateToShow = date || date.getInTimezone(this.timezone);
-
-            this.showDate(dateToShow);
+            this.showDate(date ? date.getInTimezone(this.timezone) : null);
         }
 
         getRangeDescription() {
             const monthName = cal.l10n
                 .formatMonth(this.rangeStartDate.month + 1, "calendar", "monthInYear");
 
             return cal.l10n.getCalString("monthInYear", [monthName, this.rangeStartDate.year]);
         }