Skip to content

Commit bf35f80

Browse files
authored
feat(b-form-datepicker): add pass through prop date-info-fn (closes #4826) (#5150)
1 parent 5f69864 commit bf35f80

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,11 @@ const propsMixin = {
179179
type: String,
180180
default: 'outline-secondary'
181181
},
182+
dateInfoFn: {
183+
// Passed through to b-calendar
184+
type: Function
185+
// default: undefined
186+
},
182187
// Labels for buttons and keyboard shortcuts
183188
// These pick BCalendar global config if no BFormDate global config
184189
labelPrevDecade: {
@@ -306,6 +311,7 @@ export const BFormDatepicker = /*#__PURE__*/ Vue.extend({
306311
dateDisabledFn: self.dateDisabledFn,
307312
selectedVariant: self.selectedVariant,
308313
todayVariant: self.todayVariant,
314+
dateInfoFn: self.dateInfoFn,
309315
hideHeader: self.hideHeader,
310316
showDecadeNav: self.showDecadeNav,
311317
labelPrevDecade: self.labelPrevDecade,

src/components/form-datepicker/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@
9595
"prop": "dateDisabledFn",
9696
"description": "Set to a function reference which returns `true` if the date is disabled, or `false` if the date should be enabled. See documentation for details"
9797
},
98+
{
99+
"prop": "dateInfoFn",
100+
"version": "2.12.0",
101+
"description": "Set to a function reference which returns a class (string), or classes (array of strings) to apply to the date cell. See calendar documentation for details. Passed through to the child calendar component"
102+
},
98103
{
99104
"prop": "hideHeader",
100105
"description": "When `true`, visually hides the selected date header"

0 commit comments

Comments
 (0)