我正在选择特定日期的日历,我传递了查询参数,并希望仅返回当天的结果。无论如何都可以在没有原始查询的情况下做到这一点?
if (query.hasOwnProperty('today') && query.today.length > 0) {
today = query.today.replace(/%20/g, " ");
// check for calendar selection to only show that days tasks
if (query.hasOwnProperty('calendarSelect') && query.calendarSelect === 'true') {
where.dueDate = {
$eq: moment(today).toDate()
};
}
}