mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +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 {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
min-width: 20ex;
|
||||
min-width: fit-content;
|
||||
}
|
||||
.overdue {
|
||||
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
|
||||
|
||||
return html`
|
||||
<span slot="label">${this.label}</span>
|
||||
<time ${this.id ? html`id="${this._dom_id}"` : ''}
|
||||
datetime="${parsed ? this.formatter(<Date>parsed, {dateFormat: "Y-m-d", timeFormat: "H:i:s"}) : ""}">
|
||||
${this.value ? this.formatter(<Date>parsed) : ''}
|
||||
|
Loading…
Reference in New Issue
Block a user