Strange behavior on clear date in properties

Hello forum,

I found a “strange” behavior if one clears a set date in the properties.

What I’m trying to do

When a date is set and I clear this entry by the button of the date grabber of the properties

after clear date

obsidian didn’t clear the value correctly.
It sets a "" in the field.

switch to properties ‘source’


I became aware of it, as I didn’t get any outputs in my dataview table.

well, to a string field I would say ok, but this is a date field, that awaits another data type.

Does anybody know how to fix that? It’s fiddly always switch back to source view, to check if the value is clean…

thanks in advance.

Things I have tried

+1 on this.

“Clear” should ideally set the value to the equivilent of null; not “”. One of the consequences of the current behaviour is that the Dataview plugin doesn’t work on a date property whose value is “”.

Please please consider changing this behaviour.

1 Like

+1 on this

I had the following startdate definition in my three test files:

startdate: ""         (in "Empty string date")
startdate:            (in "Empty date")
startdate: 2023-11-10 (in "Just a date")

and ran the following queries:

## Type of "startdate"
TABLE startdate, typeof(startdate)
WHERE file.folder = this.file.folder
  AND file != this.file

## Require "startdate"
WHERE file.folder = this.file.folder
  AND file != this.file
WHERE startdate

This resulted in this output:

As can be seen within the last query, both no value and the empty string are considered false value, so if you require a date using something like WHERE startdate neither of those options are any problem.

So what kind of output is erroneous in your cases? And could they not be handled using choice() or default() possibly?

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