Default datetime inputs to current date/time
This commit is contained in:
@ -1033,3 +1033,10 @@ document.addEventListener("click", (ev) => {
|
||||
inlined == "1" ? "0" : "1";
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
let now = new Date();
|
||||
document.querySelectorAll(".prefill-now").forEach((el) => {
|
||||
el.value = now.toFormat("yyyy-LL-dd'T'HH:mm:ss");
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user