Skip to content

Commit e8842ba

Browse files
authored
fix(b-form-datepicker/b-form-timepicker): label styles when in button-only mode (closes #6172) (#6186)
* fix(b-form-datepicker/b-form-timepicker): label styles when in `button-only` mode * Update bv-form-btn-label-control.js * Update bv-form-btn-label-control.js
1 parent fab6dc5 commit e8842ba

File tree

5 files changed

+203
-216
lines changed

5 files changed

+203
-216
lines changed

src/components/form-btn-label-control/bv-form-btn-label-control.js

+12-11
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,18 @@ export const BVFormBtnLabelControl = /*#__PURE__*/ Vue.extend({
208208
const $label = h(
209209
'label',
210210
{
211-
staticClass: 'form-control text-break text-wrap bg-transparent h-auto',
212-
class: [
213-
{
214-
// Hidden in button only mode
215-
'sr-only': buttonOnly,
216-
// Mute the text if showing the placeholder
217-
'text-muted': !value
218-
},
219-
this.stateClass,
220-
this.sizeFormClass
221-
],
211+
class: buttonOnly
212+
? 'sr-only' // Hidden in button only mode
213+
: [
214+
'form-control',
215+
'text-break',
216+
'text-wrap',
217+
'bg-transparent',
218+
// Mute the text if showing the placeholder
219+
{ 'text-muted': !value },
220+
this.stateClass,
221+
this.sizeFormClass
222+
],
222223
attrs: {
223224
id: idLabel,
224225
for: idButton,

src/components/form-datepicker/form-datepicker.js

-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ export const props = makePropsConfigurable(
5353
...modelProps,
5454
...calendarProps,
5555
...formBtnLabelControlProps,
56-
buttonOnly: makeProp(PROP_TYPE_BOOLEAN, false),
57-
// Applicable in button only mode
58-
buttonVariant: makeProp(PROP_TYPE_STRING, 'secondary'),
5956
// Width of the calendar dropdown
6057
calendarWidth: makeProp(PROP_TYPE_STRING, '270px'),
6158
closeButton: makeProp(PROP_TYPE_BOOLEAN, false),

0 commit comments

Comments
 (0)