Skip to content

Commit

Permalink
fix(form): inline calendar fields did not display properly
Browse files Browse the repository at this point in the history
When a ui calendar is used within a inline field, its display was broken (shrunk and not inline)
I had to use a proper direct em setting to fix this, as the input field is inside the calendar component making the usual width: auto not work as for the other standard input form fields.
  • Loading branch information
lubber-de committed Feb 17, 2020
1 parent c512cf2 commit c2ce312
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/definitions/collections/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,16 @@
font-size: @inlineInputSize;
}

.ui.form .inline.fields .field .calendar:not(.popup),
.ui.form .inline.field .calendar:not(.popup) {
display:inline-block;
}

.ui.form .inline.fields .field .calendar:not(.popup) > .input > input,
.ui.form .inline.field .calendar:not(.popup) > .input > input {
width: @inlineCalendarWidth;
}

/* Label */
.ui.form .inline.fields .field > :first-child,
.ui.form .inline.field > :first-child {
Expand Down
1 change: 1 addition & 0 deletions src/themes/default/collections/form.variables
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
@inlineLabelFontSize: @labelFontSize;
@inlineLabelFontWeight: @labelFontWeight;
@inlineLabelTextTransform: @labelTextTransform;
@inlineCalendarWidth: 13.11em;

@groupedInlineLabelMargin: 0.035714em 1em 0 0;

Expand Down

0 comments on commit c2ce312

Please sign in to comment.