From cd171082922c2e849d12a0d9e898e00315a2f85a Mon Sep 17 00:00:00 2001 From: Thijs Louisse Date: Sat, 1 May 2021 18:16:50 +0200 Subject: [PATCH] fix(input-date): config set before property effects run --- packages/input-date/src/LionInputDate.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/input-date/src/LionInputDate.js b/packages/input-date/src/LionInputDate.js index 2fe7a4738..a803538a5 100644 --- a/packages/input-date/src/LionInputDate.js +++ b/packages/input-date/src/LionInputDate.js @@ -34,6 +34,8 @@ export class LionInputDate extends LocalizeMixin(LionInput) { this.parser = value => (value === '' ? undefined : parseDate(value)); this.formatter = formatDate; this.defaultValidators.push(new IsDate()); + // Just explicitly make clear we shouldn't use type 'date' + this.type = 'text'; } /** @param {import('@lion/core').PropertyValues } changedProperties */ @@ -44,12 +46,6 @@ export class LionInputDate extends LocalizeMixin(LionInput) { } } - connectedCallback() { - // eslint-disable-next-line wc/guard-super-call - super.connectedCallback(); - this.type = 'text'; - } - /** * @param {Date} modelValue */