web/elements: add support for datetime-local
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
d79975c409
commit
8022d0801d
|
@ -136,6 +136,8 @@ export class Form<T> extends LitElement {
|
||||||
json[element.name] = values;
|
json[element.name] = values;
|
||||||
} else if (element.tagName.toLowerCase() === "input" && element.type === "date") {
|
} else if (element.tagName.toLowerCase() === "input" && element.type === "date") {
|
||||||
json[element.name] = element.valueAsDate;
|
json[element.name] = element.valueAsDate;
|
||||||
|
} else if (element.tagName.toLowerCase() === "input" && element.type === "datetime-local") {
|
||||||
|
json[element.name] = new Date(element.valueAsNumber);
|
||||||
} else if (element.tagName.toLowerCase() === "input" && element.type === "checkbox") {
|
} else if (element.tagName.toLowerCase() === "input" && element.type === "checkbox") {
|
||||||
json[element.name] = element.checked;
|
json[element.name] = element.checked;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -223,7 +223,7 @@ export class PlexSourceForm extends ModelForm<PlexSource, string> {
|
||||||
>
|
>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
value="${first(this.instance?.clientId)}"
|
value="${first(this.instance?.clientId, "")}"
|
||||||
class="pf-c-form-control"
|
class="pf-c-form-control"
|
||||||
required
|
required
|
||||||
/>
|
/>
|
||||||
|
|
Reference in a new issue