mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-26 18:03:39 +01:00
Shrink minimum size for date widget to fit-content, add label if set
This commit is contained in:
parent
d11be10fa1
commit
9ffc7decf2
@ -12,7 +12,7 @@ export const dateStyles = [
|
|||||||
:host {
|
:host {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
min-width: 20ex;
|
min-width: fit-content;
|
||||||
}
|
}
|
||||||
.overdue {
|
.overdue {
|
||||||
color: red; // var(--whatever the theme color)
|
color: red; // var(--whatever the theme color)
|
||||||
|
@ -56,6 +56,7 @@ export class Et2DateReadonly extends Et2Widget(LitElement) implements et2_IDetac
|
|||||||
let parsed : Date | Boolean = this.value ? this.parser(this.value) : false
|
let parsed : Date | Boolean = this.value ? this.parser(this.value) : false
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
|
<span slot="label">${this.label}</span>
|
||||||
<time ${this.id ? html`id="${this._dom_id}"` : ''}
|
<time ${this.id ? html`id="${this._dom_id}"` : ''}
|
||||||
datetime="${parsed ? this.formatter(<Date>parsed, {dateFormat: "Y-m-d", timeFormat: "H:i:s"}) : ""}">
|
datetime="${parsed ? this.formatter(<Date>parsed, {dateFormat: "Y-m-d", timeFormat: "H:i:s"}) : ""}">
|
||||||
${this.value ? this.formatter(<Date>parsed) : ''}
|
${this.value ? this.formatter(<Date>parsed) : ''}
|
||||||
|
Loading…
Reference in New Issue
Block a user