diff --git a/api/js/etemplate/Et2Date/Et2Date.ts b/api/js/etemplate/Et2Date/Et2Date.ts index a91a9fbd6e..3c509406cf 100644 --- a/api/js/etemplate/Et2Date/Et2Date.ts +++ b/api/js/etemplate/Et2Date/Et2Date.ts @@ -830,7 +830,7 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(LitFlatpickr)) */ findInputField() : HTMLInputElement { - return this._inputNode.shadowRoot.querySelector('input:not([type="hidden"])'); + return this._inputNode?.shadowRoot?.querySelector('input:not([type="hidden"])'); } /**