diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-05-17 01:07:09 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-05-17 01:07:09 +0200 |
commit | 3d3963e53cb0646ded92c871a6ea7636b25714b3 (patch) | |
tree | 6cc6807ea74511258c542ac6615ecd126f7b47ed /static/binders.js | |
parent | Rework date-time input to be cleaner + work again. (diff) | |
download | calp-3d3963e53cb0646ded92c871a6ea7636b25714b3.tar.gz calp-3d3963e53cb0646ded92c871a6ea7636b25714b3.tar.xz |
Cleanup + fix for wholeday checkbox.
Diffstat (limited to '')
-rw-r--r-- | static/binders.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/static/binders.js b/static/binders.js index 72550191..12d968e4 100644 --- a/static/binders.js +++ b/static/binders.js @@ -103,8 +103,14 @@ function bind_wholeday(el, e) { } for (let f of ['dtstart', 'dtend']) { - let d = el.properties[f]; - if (! d) continue; /* dtend optional */ + let param = el.properties[f]; + if (! param) continue; /* dtend optional */ + let d = param.value; + if (wholeday.checked) { + param.type = 'date'; + } else { + param.type = 'date-time'; + } d.isWholeDay = wholeday.checked; el.properties[f] = d; } |