Hide dates in tasks query

Hello. I’ve got tasks from kanban board with today(or earlyer) dates and it works, but every task has ugly date.


WHERE due AND (due <= date(today)) AND !done
GROUP BY header
SORT rows.line

I imagine how to do this with regexreplace in table query, but how to do this with task query?

I tried DataviewJS:

const result = dv.page("TODO").file.tasks
  .where(t => t.due && !t.completed)
  .where(t => (t.due <= dv.date("today")))
  .groupBy(t => t.header);
result.forEach(g => g.rows.forEach(t => t.text = t.text.replace(/@(.*)}/, "")));

It looks ok, but checkboxes that I checks not refresh source.

Within dataviewjs you’ve got the option of the visual field for display purposes like these, so without actually testing your query, try replacing the t.text = ... with t.visual = .... Hopefully, that should display your nicer text, whilst still retaining the link and completion features of the task.

It works! Thanks!

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