diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-14 22:29:29 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-07-14 22:29:29 +0200 |
commit | 99afbb4a288966b5228e95b449783625ae4e0b29 (patch) | |
tree | d36a06ddc1f6f826f8bbb3f48c8a72d28c696cfb /static/script.js | |
parent | Add TODO about id to functions JS. (diff) | |
download | calp-99afbb4a288966b5228e95b449783625ae4e0b29.tar.gz calp-99afbb4a288966b5228e95b449783625ae4e0b29.tar.xz |
Fix time input error after emptying.
Diffstat (limited to '')
-rw-r--r-- | static/script.js | 2 |
1 files changed, 2 insertions, 0 deletions
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]); |