add readonly property to input
This commit is contained in:
@@ -17,6 +17,15 @@ export class UmbInputDateElement extends UUIFormControlMixin(UmbLitElement, '')
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the input to readonly mode, meaning value cannot be changed but still able to read and select its content.
|
||||
* @type {boolean}
|
||||
* @attr
|
||||
* @default false
|
||||
*/
|
||||
@property({ type: Boolean, reflect: true })
|
||||
readonly: boolean = false;
|
||||
|
||||
/**
|
||||
* Specifies the type of input that will be rendered.
|
||||
* @type {'date'| 'time'| 'datetime-local'}
|
||||
@@ -49,7 +58,8 @@ export class UmbInputDateElement extends UUIFormControlMixin(UmbLitElement, '')
|
||||
.step=${this.step}
|
||||
.type=${this.type}
|
||||
value=${ifDefined(this.value)}
|
||||
@change=${this.#onChange}>
|
||||
@change=${this.#onChange}
|
||||
?readonly=${this.readonly}>
|
||||
</uui-input>`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user