display dates in table

This commit is contained in:
Fran Jurmanović
2021-06-20 12:04:29 +02:00
parent 21bee9d477
commit 40f5d6745a
4 changed files with 51 additions and 5 deletions

View File

@@ -13,6 +13,7 @@ class InputFieldElement extends BaseComponentElement {
@attr type: string;
@attr label: string;
@attr rules: string;
@attr pattern: string;
@attr customAction: string;
@target main: HTMLElement;
@target inp: HTMLElement;
@@ -102,6 +103,20 @@ class InputFieldElement extends BaseComponentElement {
};
const renderInput = (type) => {
if (this.pattern) {
return html` <input
type="${this.type}"
pattern="${this.pattern}"
step="0.01"
data-target="input-field.inp"
id="${this.randId}"
app-action="
input:input-field#inputChange
blur:input-field#validateDisplay
${this.customAction ? this.customAction : ''}
"
/>`;
}
return html` <input
type="${this.type}"
data-target="input-field.inp"