Daily Notes Template from Calendar

Hey there,

I am trying to get my daily note template right. I got a template which I like, but when I trigger a new daily note via the Calendar plugin by Liam Cain it does fill in the current date to the properties. How can I change that to use the day I chose in the Calendar plugin?

---
aliases:
  - <% "Daily Note " + tp.date.now("DD.MM.YYYY") %>
date:
  - <% tp.date.now() %>
---

Thanks in advance

1 Like

When you click on the day in Calendar, it gets passed off to Daily Notes (or Periodic Notes) to create the note.

If you wanted to use your Templater template above, you need to switch on this setting in Templater and select that template in Settings > Daily Notes.


If you aren’t using Templater, the template syntax would look something like this:

---
aliases:
  - "Daily Note {{date:DD.MM.YYYY}}"
date:
  - {{date:YYYY-MM-DD}}
---
1 Like

That isn´t my problem. It triggers the template without any issue. My problem is that the tamplate contains tp.date.now(). Because of this, whenever I create a daily note in advance it will contain the wrong date in the properties (alias and date). Not in the title.
So my questio is how can I change my template so that it takes the title (e.g. tomorrow: 2023-10-11) and puts it in the properties correctly.

Understood. When I used daily notes, I used the Daily Notes syntax when creating future notes with the Calendar plugin.

For Templater templates, tp.file.title will probably be needed in the template. You’ll have to adjust the output to your liking, but this works in the template when clicking on future dates in the Calendar if the note title is YYYY-MM-DD:

<% tp.date.now("dddd Do MMM YYYY", 0, tp.file.title, "YYYY-MM-DD") %>
5 Likes

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