Describe the bug
The date passed as a parameter is not rendered in the template as a date.
To Reproduce
- Create a template choise named
dated_note with file template content:
# {{VDATE:date,DD MMMM YYYY}}, {{VDATE:date,dddd}}
- Try to execute the template throw javascript API with the specific date:
app.plugins.plugins.quickadd.api.executeChoice("dated_note", {date: "2026-12-31"})
- Or throw the obsidian url:
obsidian://quickadd?choice=dated_note&value-date=2026-12-31
Expected behavior
Will be created a note with content:
# 31 December 2026, Thursday
Fact behavior
However, if I run this template through the command palette and enter the date in the pop-up window, everything works correctly.
I expect that seeing the VDATE keyword in template QuickAdd will attempt to convert the parameter to a date and then output it in the required format. In fact, no conversion to a date occurs and the parameter is simply output in the template as a string, ignoring the format.
An alternative solution I see is to explicitly pass the parameter type, but I didn't find in the documentation how to do this.
Obsidian Debug Info
SYSTEM INFO:
Obsidian version: v1.10.6
Installer version: v1.5.12
Operating system: Windows 10 Pro 10.0.26100
Login status: not logged in
Language: ru
Insider build toggle: off
Live preview: off
Base theme: dark
Community theme: AnuPpuccin v1.5.0
Snippets enabled: 3
Restricted mode: off
Plugins installed: 19
Plugins enabled: 1
1: QuickAdd v2.9.4
Describe the bug
The date passed as a parameter is not rendered in the template as a date.
To Reproduce
dated_notewith file template content:# {{VDATE:date,DD MMMM YYYY}}, {{VDATE:date,dddd}}Expected behavior
Will be created a note with content:
# 31 December 2026, ThursdayFact behavior
# 2026-12-31, 2026-12-31However, if I run this template through the command palette and enter the date in the pop-up window, everything works correctly.
I expect that seeing the
VDATEkeyword in template QuickAdd will attempt to convert the parameter to a date and then output it in the required format. In fact, no conversion to a date occurs and the parameter is simply output in the template as a string, ignoring the format.An alternative solution I see is to explicitly pass the parameter type, but I didn't find in the documentation how to do this.
Obsidian Debug Info