liamcain / obsidian-calendar-plugin

Simple calendar widget for Obsidian.
MIT License
1.64k stars 142 forks source link

{{date}} gets incorrectly applied when creating note from calendar view #376

Open jobox05 opened 1 month ago

jobox05 commented 1 month ago

The Problem

When creating a daily note from a template by clicking the date on the calendar, any {{date}} field gets incorrectly set to the date of the note rather than the current date.

For example, if I create the daily note for 2024-10-20 (the 20th of October) on 2024-10-16 (the 16th of October), any {{date}} specified in the template gets set to 2024-10-20 rather than the current date 2024-10-16.

Steps to reproduce

  1. Create a daily note template containing a {{date}} field
  2. Go to the calendar view in the sidebar and click a random uncreated note that isnt of the current date
  3. observe that {{date}} has been incorrectly set to the date of the note rather than the current date.

Expected behavior

When creating a note from the template through the calendar I expected the {{date}} to be replaced with the current date rather than the date of the note

Screenshots

Daily Note Template image Created Daily Note from the Issue (note that the {{time}} property gets appliead correctly): image

OS

Persists on multiple devices and operating systems: Win11; Android;

Obsidian Version

Version 1.6.7

Theme :

Issue persists on both default theme and minimal.