From 99afbb4a288966b5228e95b449783625ae4e0b29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 14 Jul 2020 22:29:29 +0200 Subject: Fix time input error after emptying. --- static/script.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'static/script.js') diff --git a/static/script.js b/static/script.js index 0f9dace9..6870819b 100644 --- a/static/script.js +++ b/static/script.js @@ -328,6 +328,8 @@ function place_in_edit_mode (event) { required: true, onchange: function (e) { + /* Only update datetime when the input is filled out */ + if (! this.value) return; let [hour, minute] = this.value.split(":").map(Number); /* retain the year, month, and day information */ let d = copyDate(event.properties[fieldname]); -- cgit v1.2.3