34 lines
899 B
Markdown
34 lines
899 B
Markdown
<%*
|
|
const fm = tp.frontmatter;
|
|
const created = fm.created || tp.file.creation_date("YYYY-MM-DD[T]HH:mm:ss");
|
|
let date = fm.date;
|
|
let scheduled = fm.scheduled;
|
|
|
|
// If 'scheduled' is empty, trigger the prompt
|
|
if (!scheduled) {
|
|
if (date) {
|
|
// If we have a date but no scheduled time, suggest the date
|
|
date = await tp.system.prompt("Enter Scheduled Date", date);
|
|
scheduled = date + "T" + await tp.system.prompt("Enter Scheduled Time", "00:00") + ":00";
|
|
}
|
|
else {
|
|
// Otherwise suggest the full creation timestamp
|
|
const time = String(created).substring(11,16);
|
|
date = String(created).substring(0,10);
|
|
date = await tp.system.prompt("Enter Scheduled Date", date);
|
|
scheduled = date + "T" + await tp.system.prompt("Enter Scheduled Time", time) + ":00";
|
|
}
|
|
}
|
|
-%>
|
|
---
|
|
date: <% date %>
|
|
created: <% created %>
|
|
scheduled: <% scheduled %>
|
|
up:
|
|
- "[[Meetings]]"
|
|
title:
|
|
org:
|
|
loc:
|
|
people:
|
|
topics:
|
|
--- |