Bug 624211 - Current Tasks filter should only show completed tasks if completed today r=philipp ui-r=richard.marti
--- a/calendar/base/src/calFilter.js
+++ b/calendar/base/src/calFilter.js
@@ -101,16 +101,26 @@ calFilter.prototype = {
open: function cF_filterCompleted(item) {
return (percentCompleted(item) < 100);
},
completed: function cF_filterCompleted(item) {
return (percentCompleted(item) >= 100);
},
repeating: function cF_filterRepeating(item) {
return (item.recurrenceInfo != null);
+ },
+ throughcurrent: function cF_filterThroughCurrent(item) {
+ if (!item.completedDate) {
+ return true;
+ }
+ // filter out tasks completed earlier than today
+ let today = cal.now();
+ today.isDate = true;
+
+ return (today.compare(item.completedDate) <= 0);
}
},
get startDate() {
return this.mStartDate;
},
set startDate(aStartDate) {