Bug 1572964 - Show last day of event that starts outside the current view; r=pmorris
authorGeoff Lankow <geoff@darktrojan.net>
Fri, 29 Nov 2019 12:27:46 +1300
changeset 28318 024dcda92904010d68c1b677bef4cc4b3cac1c06
parent 28317 86bcd09473928085972a27648f24e91ddf1dba1e
child 28319 50716b66d571c60ef4163dd8da665dbde7b35db5
push id16769
push usergeoff@darktrojan.net
push dateThu, 05 Dec 2019 06:41:22 +0000
treeherdercomm-central@8251df0dbc9f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspmorris
bugs1572964
Bug 1572964 - Show last day of event that starts outside the current view; r=pmorris
calendar/base/content/calendar-month-base-view.js
calendar/base/content/calendar-multiday-base-view.js
--- a/calendar/base/content/calendar-month-base-view.js
+++ b/calendar/base/content/calendar-month-base-view.js
@@ -656,22 +656,21 @@ var { cal } = ChromeUtils.import("resour
         targetDate = this.mStartDate.clone();
       }
 
       if (finishDate.compare(this.mEndDate) > 0) {
         finishDate = this.mEndDate.clone();
         finishDate.day++;
       }
 
-      if (!targetDate.isDate) {
-        // Reset the time to 00:00, so that we really get all the boxes.
-        targetDate.hour = 0;
-        targetDate.minute = 0;
-        targetDate.second = 0;
-      }
+      // Reset the time to 00:00, so that we really get all the boxes.
+      targetDate.isDate = false;
+      targetDate.hour = 0;
+      targetDate.minute = 0;
+      targetDate.second = 0;
 
       if (targetDate.compare(finishDate) == 0) {
         // We have also to handle zero length events in particular for
         // tasks without entry or due date.
         const box = this.findDayBoxForDate(targetDate);
         if (box) {
           boxes.push(box);
         }
--- a/calendar/base/content/calendar-multiday-base-view.js
+++ b/calendar/base/content/calendar-multiday-base-view.js
@@ -1406,22 +1406,21 @@
         targetDate = this.mStartDate.clone();
       }
 
       if (finishDate.compare(this.mEndDate) > 0) {
         finishDate = this.mEndDate.clone();
         finishDate.day++;
       }
 
-      if (!targetDate.isDate) {
-        // Set the time to 00:00 so that we get all the boxes.
-        targetDate.hour = 0;
-        targetDate.minute = 0;
-        targetDate.second = 0;
-      }
+      // Set the time to 00:00 so that we get all the boxes.
+      targetDate.isDate = false;
+      targetDate.hour = 0;
+      targetDate.minute = 0;
+      targetDate.second = 0;
 
       if (targetDate.compare(finishDate) == 0) {
         // We have also to handle zero length events in particular for
         // tasks without entry or due date.
         const col = this.findColumnForDate(targetDate);
         if (col) {
           columns.push(col);
         }