Fix JS error about can't find input box from init()

This commit is contained in:
nathan 2022-07-22 08:42:35 -06:00
parent b8ffa91efe
commit a0467b2e55

View File

@ -394,7 +394,7 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(ValidateMixin(LitFl
{ {
let options = super.getOptions(); let options = super.getOptions();
options.altFormat = this.egw()?.preference("dateformat") || "Y-m-d"; options.altFormat = <string>this.egw()?.preference("dateformat") || "Y-m-d";
options.altInput = true; options.altInput = true;
options.allowInput = true; options.allowInput = true;
options.dateFormat = "Y-m-dT00:00:00\\Z"; options.dateFormat = "Y-m-dT00:00:00\\Z";
@ -627,12 +627,12 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(ValidateMixin(LitFl
} }
/** /**
* The interactive (form) element. Override from Lion * The interactive (form) element.
* @protected * @protected
*/ */
get _inputNode() get _inputNode() : HTMLElement
{ {
return /** @type {HTMLElementWithValue} */ (this.querySelector('et2-textbox[type="text"]')); return this.querySelector('et2-textbox');
} }
} }