Previous/Next daily note buttons not working after clicking

Hi folks, could anybody help me with my problem? I am trying to compose a template for my daily notes. In this template I try to add two buttons for previous and next daily note (yesterday and tomorrow).

I’ve created a template file that uses inline buttons whose code is defined in a separate file Buttons.md. In this file both buttons are defined:

name <<
type command
action Daily notes: Open previous daily note

^button-prevDailyNote

name >>
type command
action Daily notes: Open next daily note

^button-nextDailyNote

In my template I use these buttons as inline buttons. in the line starting with previous note button, followed by current date, followed by next note button. Like this:

button-prevDailyNote | <% moment(tp.file.title,‘YYYY-MM-DD’).format(“dddd, MMMM DD, YYYY”) %> | button-nextDailyNote

Once I generate the daily note using template, the buttons are successfully generated,

but they do not work after clicking. In the console I can see the following error in the buttons JS code.

Has anyone experienced the similar problem?

Thank you,

Ondrej

And where did you find/define the commands for next and prev daily notes? I can’t see them in my Obsidian, and never heard of them before.

In most cases people do some coding to get links based upon current date (or the file date) for previous and next date.

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