How do you return tasks due today in dataviewjs?

Things I have tried

dv.tasklist(dv.pages().file.tasks
.where(t => t.due && t.due == dv.date('today')

It’s easy in dataview

tasks
where due = date(today)

What I’m trying to do

I just want to return the tasks that are due today.

I’m not versed in JS… but dates in JS are a really weird thing. :slight_smile:

But try this:

dv.taskList(dv.pages().file.tasks.where(t => t.due?.ts == dv.date('today').ts))

If you don’t want tasks grouped by pages (default groups), then you can use:

dv.taskList(dv.pages().file.tasks.where(t => t.due?.ts == dv.date('today').ts), false)
2 Likes

Excellent! Thank you @mnvwvnm !

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.