8000 Update form-datepicker.js · bootstrap-vue/bootstrap-vue@fb6dbee · GitHub
[go: up one dir, main page]

Skip to content

Commit fb6dbee

Browse files
committed
Update form-datepicker.js
1 parent e3df0c3 commit fb6dbee

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

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

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,30 @@ const {
3232

3333
// --- Props ---
3434

35+
const calendarProps = omit(BCalendarProps, [
36+
'block',
37+
'hidden',
38+
'id',
39+
'noKeyNav',
40+
'roleDescription',
41+
'value',
42+
'width'
43+
])
44+
45+
const formBtnLabelControlProps = omit(BVFormBtnLabelControlProps, [
46+
'formattedValue',
47+
'id',
48+
'lang',
49+
'rtl',
50+
'value'
51+
])
52+
3553
export const props = makePropsConfigurable(
3654
sortKeys({
3755
...idProps,
3856
...modelProps,
39-
...omit(BCalendarProps, ['id', 'value']),
40-
...omit(BVFormBtnLabelControlProps, ['formattedValue', 'id', 'lang', 'rtl', 'value']),
57+
...calendarProps,
58+
...formBtnLabelControlProps,
4159
buttonOnly: makeProp(PROP_TYPE_BOOLEAN, false),
4260
// Applicable in button only mode
4361
buttonVariant: makeProp(PROP_TYPE_STRING, 'secondary'),
@@ -262,9 +280,10 @@ export const BFormDatepicker = /*#__PURE__*/ Vue.extend({
262280
{
263281
staticClass: 'b-form-date-calendar w-100',
264282
props: {
265-
...pluckProps(BCalendarProps, $props),
283+
...pluckProps(calendarProps, $props),
266284
value: localYMD,
267-
hidden: !this.isVisible
285+
hidden: !this.isVisible,
286+
width: this.calendarWidth
268287
},
269288
on: {
270289
selected: this.onSelected,
@@ -291,7 +310,7 @@ export const BFormDatepicker = /*#__PURE__*/ Vue.extend({
291310
{
292311
staticClass: 'b-form-datepicker',
293312
props: {
294-
...pluckProps(BVFormBtnLabelControlProps, $props),
313+
...pluckProps(formBtnLabelControlProps, $props),
295314
id: this.safeId(),
296315
value: localYMD,
297316
formattedValue: localYMD ? this.formattedValue : '',

0 commit comments

Comments
 (0)
0