From b8ffa91efea8f798244ac5f2971d589ff12a383b Mon Sep 17 00:00:00 2001 From: ralf Date: Fri, 22 Jul 2022 15:45:47 +0200 Subject: [PATCH] use et2-textbox instead of an input for et2-date* to inherit SL styling --- api/js/etemplate/Et2Date/Et2Date.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Date/Et2Date.ts b/api/js/etemplate/Et2Date/Et2Date.ts index ef425edf71..90ab4cf116 100644 --- a/api/js/etemplate/Et2Date/Et2Date.ts +++ b/api/js/etemplate/Et2Date/Et2Date.ts @@ -19,6 +19,7 @@ import "flatpickr/dist/plugins/scrollPlugin.js"; import {holidays} from "./Holidays"; import flatpickr from "flatpickr"; import {egw} from "../../jsapi/egw_global"; +import {Et2Textbox} from "../Et2Textbox/Et2Textbox"; // Request this year's holidays now holidays(new Date().getFullYear()); @@ -334,7 +335,7 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(ValidateMixin(LitFl ...super.slots, input: () => { - const text = document.createElement('input'); + const text = document.createElement('et2-textbox'); text.type = "text"; return text; } @@ -631,7 +632,7 @@ export class Et2Date extends Et2InputWidget(FormControlMixin(ValidateMixin(LitFl */ get _inputNode() { - return /** @type {HTMLElementWithValue} */ (this.querySelector('input[type="text"]')); + return /** @type {HTMLElementWithValue} */ (this.querySelector('et2-textbox[type="text"]')); } }