fix(input-date): config set before property effects run

This commit is contained in:
Thijs Louisse 2021-05-01 18:16:50 +02:00 committed by Thomas Allmer
parent 8cd0142d12
commit cd17108292

View file

@ -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
*/