forked from extern/egroupware
Et2DateDuration improvements:
- If display.unit is not set, show the first unit option instead of blank selectbox - Move number spinner to edge of box so numbers have more space
This commit is contained in:
parent
e9f0a5216b
commit
0186714112
@ -135,6 +135,9 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
max-width: 4.5em;
|
max-width: 4.5em;
|
||||||
margin-right: -2px;
|
margin-right: -2px;
|
||||||
}
|
}
|
||||||
|
et2-textbox::part(input) {
|
||||||
|
padding-right: 0px;
|
||||||
|
}
|
||||||
et2-textbox:not(:last-child)::part(base) {
|
et2-textbox:not(:last-child)::part(base) {
|
||||||
border-right: none;
|
border-right: none;
|
||||||
border-top-right-radius: 0px;
|
border-top-right-radius: 0px;
|
||||||
@ -556,7 +559,7 @@ export class Et2DateDuration extends Et2InputWidget(FormControlMixin(LitElement)
|
|||||||
};
|
};
|
||||||
// It would be nice to use an et2-select here, but something goes weird with the styling
|
// It would be nice to use an et2-select here, but something goes weird with the styling
|
||||||
return html`
|
return html`
|
||||||
<et2-select value="${this._display.unit}">
|
<et2-select value="${this._display.unit || this.displayFormat[0]}">
|
||||||
${[...this.displayFormat].map((format : string) =>
|
${[...this.displayFormat].map((format : string) =>
|
||||||
html`
|
html`
|
||||||
<sl-menu-item value=${format} ?checked=${this._display.unit === format}>
|
<sl-menu-item value=${format} ?checked=${this._display.unit === format}>
|
||||||
|
Loading…
Reference in New Issue
Block a user