diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-10-06 02:17:07 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2021-10-06 02:17:07 +0200 |
commit | 612948090468fbc6279d7c9774d4f3839ab54d72 (patch) | |
tree | c8a747c5f16820460d8f04d191a9dc439bbb76e1 /static/globals.ts | |
parent | add development start script. (diff) | |
download | calp-612948090468fbc6279d7c9774d4f3839ab54d72.tar.gz calp-612948090468fbc6279d7c9774d4f3839ab54d72.tar.xz |
Fix issue with datetimes not getting set.
Diffstat (limited to 'static/globals.ts')
-rw-r--r-- | static/globals.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/static/globals.ts b/static/globals.ts index 64a3613f..0df1aabd 100644 --- a/static/globals.ts +++ b/static/globals.ts @@ -124,7 +124,7 @@ class ComponentEdit extends ComponentVEvent { } for (let el of body.getElementsByClassName("interactive")) { - if (!(el instanceof HTMLInputElement)) continue; + if (!(el instanceof HTMLElement)) continue; let p = el.dataset.property!; let d: any; if ((d = data.getProperty(p))) { @@ -136,7 +136,9 @@ class ComponentEdit extends ComponentVEvent { here. But due to my custom components implementing custom `.value' procedures, we might not need any special cases here */ - console.log(el, d); + /* Technically we just want to cast to HTMLElement with + value field here, but multiple types implement it + sepparately, and no common interface exist */ (el as HTMLInputElement).value = d; }); } |