diff --git a/client/components/main/globalSearch.js b/client/components/main/globalSearch.js index 176d6d375..526f744b6 100644 --- a/client/components/main/globalSearch.js +++ b/client/components/main/globalSearch.js @@ -368,7 +368,7 @@ BlazeComponent.extendComponent({ } else if (operator === 'dueAt' && value === 'overdue') { value = { operator: '$lt', - value: moment().format(), + value: moment(moment().format('YYYY-MM-DD')).format(), }; } else { this.parsingErrors.push({ @@ -380,15 +380,15 @@ BlazeComponent.extendComponent({ } else { if (operator === 'dueAt') { value = { - operator: '$lte', - value: moment() - .add(days, duration ? duration : 'days') + operator: '$lt', + value: moment(moment().format('YYYY-MM-DD')) + .add(days + 1, duration ? duration : 'days') .format(), }; } else { value = { operator: '$gte', - value: moment() + value: moment(moment().format('YYYY-MM-DD')) .subtract(days, duration ? duration : 'days') .format(), };