The backlink shortcut not working properly

Steps to reproduce

You create date properties with yaml frontmatter
One with only one date and other with multiple date and using “-” in the beginning
Example:

created: 2024-08-25
modified:

  • 2024-08-31
  • 2024-08-21

And turn on the properties plugin
When click the shortcut button on the properties with only one date it working normally and open the right date
But on the one with multiple date it couldn’t open and said invalid date

Did you follow the troubleshooting guide? [Y/N]

Yes I’ve test it in sandbox vault

Expected result

Open the date of the fist item in the list when click the shortcut button

Actual result

Wrong date and invalid date when click the short cut button

Environment

SYSTEM INFO:
Operating system: android 14 (Xiaomi POCO F2 Pro)
Obsidian version: 1.6.7 (149)
API version: v1.6.7
Login status: not logged in
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on
Plugins installed: 0
Plugins enabled: 0

RECOMMENDATIONS:
none


Additional information



I think you can’t have a list of values for a date or date/time type of key :thinking:

Your modified key should probably be set to list (as there are multiple values) instead of date (which accepts only one date)


Edit: Because this got me curious :sweat_smile:

After some testing, if you actually set the modified key to date & time, you’ll see that the 2nd date in the list is interpreted as the beginning of the time part…

Having this in Source Mode:

---
modified: 
  - 2024-08-31
  - 2024-09-01
---
Test

Results in this in Live Preview (from the Sandbox Vault):

So the 2nd date seems to be “merged” with the 1st date…

Which could partially explain why clicking on the Daily Note link icon fails: The value within the the YAML isn’t really read as a date but as a somewhat strange looking/a bit malformed date/time (At least, this is how I interpret it … and I could be completely wrong :sweat_smile: :innocent: )

There could still be a bug in all this, imho: Properties should be able to see and inform you, through the “type mismatch” warning icon, that the type of key used (date) isn’t the right one, I think :thinking:

That is, if my assumption about the date and date & time types of key is correct: Only one date is allowed (expected to work properly) in a date type of key, only one date/time is allowed (expected to work properly) in a date & time type of key and any keys meant to store multiple values should be set to list :innocent: .

Copying & pasting in a note without any YAML/Properties, in Source mode, the bits of markdown I shared here (above) and then switching to Live Preview, Properties automatically reads and parse the modified key as a List (which is what I expected) … But then setting that same key from Properties to date or date & time doesn’t seem to trigger the type mismatch warning either :woman_shrugging: (like it does for any other types of key: text, number, etc…) …

SYSTEM INFO:
	Obsidian version: v1.7.1
	Installer version: v1.6.7
	Operating system: Darwin Kernel Version 20.6.0: Thu Jul  6 22:12:47 PDT 2023; root:xnu-7195.141.49.702.12~1/RELEASE_X86_64 20.6.0
	Login status: logged in
	Language: en
	Catalyst license: supporter
	Insider build toggle: on
	Live preview: on
	Base theme: adapt to system
	Community theme: none
	Snippets enabled: 0
	Restricted mode: on

RECOMMENDATIONS:
	none
1 Like

As PCH explained, date and datetime are for single dates, not list of dates.

Yeah what i currently use is date only, not date time

Yeah actually the property display right the first date so i think when i click shortcut will be more convenient to do so