From 612948090468fbc6279d7c9774d4f3839ab54d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 6 Oct 2021 02:17:07 +0200 Subject: Fix issue with datetimes not getting set. --- static/globals.ts | 6 ++++-- 1 file 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; }); } -- cgit v1.2.3