NotePlanN
NotePlan

Daily note template renders the wrong date when created from the calendar

My daily note template uses <%- date.format("ddd, MMM D, YYYY", Editor.title) %> in the H1. When I click an empty day on the calendar, the template sometimes renders before the editor switches to the new note, so the H1 gets the date of the note I was just viewing. Example: with Nov 11 open, clicking Nov 12 produced "Wed, Nov 11, 2026," then clicking Nov 13 produced "Thu, Nov 12, 2026." It's intermittent and happens more when clicking between days quickly. Could templates get a variable for the date of the note being created, or could Editor point to the new note before the template renders?
PendingPending