QuickAdd Plugin

Folks,

I asked a question here on how to be able to request a single date/time from the user and then apply it or parts of it in deference places using QuickAdd and its variable support. I think the (clunky) solution I found may help some people. Follwoing is a file template I use for a Capture:

---
title: {{VALUE}}
allDay: false
scheduled: {{VDATE:Scheduled, YYYY-MM-DDTHH:MM}}
date: <% tp.date.now("YYYY-MM-DD", 0, "{{VALUE:Scheduled}}", "YYYY-MM-DDTHH:MM") %>
startTime: <% tp.date.now("HH:MM", 0, "{{VALUE:Scheduled}}", "YYYY-MM-DDTHH:MM") %>
endTime: <% (Number(tp.date.now("HH", 0, "{{VALUE:Scheduled}}", "YYYY-MM-DDTHH:MM")) + 1).toString() + ":00" %>
completed: null
---

So here the user is asked to for date/time to schedule an event for the Full Calendar plugin, and the date part is used for the date field, the time part is used for the startTime field, and the endTime is calculated as the startTime + 1 (numbers treated as numbers, not dates).

Some folks might find it useful, perhaps, and, even better, maybe some folks can improve this!

1 Like