diff --git a/calendar/base/src/calTodo.js b/calendar/base/src/calTodo.js index 256edb82900e..b9c011cd7e4b 100644 --- a/calendar/base/src/calTodo.js +++ b/calendar/base/src/calTodo.js @@ -231,6 +231,24 @@ calTodo.prototype = { isPropertyPromoted: function (name) { return (this.todoPromotedProps[name]); }, + + getOccurrencesBetween: function(aStartDate, aEndDate, aCount) { + if (this.recurrenceInfo) { + return this.recurrenceInfo.getOccurrences(aStartDate, aEndDate, 0, aCount); + } + if (!this.entryDate && !this.dueDate) + return null; + + if ((this.entryDate && this.entryDate.compare(aStartDate) >= 0 && this.entryDate.compare(aEndDate) <= 0) || + (this.dueDate && this.dueDate.compare(aStartDate) >= 0 && this.dueDate.compare(aEndDate) <= 0)) + { + aCount.value = 1; + return ([ this ]); + } + + aCount.value = 0; + return null; + } }; // var decl to prevent spurious error messages when loaded as component diff --git a/calendar/lightning/content/agenda-tree-overlay.xul b/calendar/lightning/content/agenda-tree-overlay.xul index 2be666361e3c..dcfcf09dc968 100644 --- a/calendar/lightning/content/agenda-tree-overlay.xul +++ b/calendar/lightning/content/agenda-tree-overlay.xul @@ -10,11 +10,11 @@