Skip to content

Commit

Permalink
Update vue-datepicker.js
Browse files Browse the repository at this point in the history
- added built-in methods
- added `set` method (use to call multiple setters)
  • Loading branch information
dmuy committed Dec 2, 2021
1 parent 73ef783 commit 2babd82
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions vue-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,21 @@ export default {
hidden: { type: Function }
},
methods: {
setValue(value) { duDatepicker(this.$el, 'setValue', value) },
show() { duDatepicker(this.$el, 'show') },
hide() { duDatepicker(this.$el, 'hide') },
destroy() { duDatepicker(this.$el, 'destroy') }
destroy() { duDatepicker(this.$el, 'destroy') },
setValue(value) { duDatepicker(this.$el, 'setValue', value) },
setTheme(theme) { duDatepicker(this.$el, 'setTheme', theme) },
setMinDate(date) { duDatepicker(this.$el, 'setMinDate', date) },
setMaxDate(date) { duDatepicker(this.$el, 'setMaxDate', date) },
setMinYear(year) { duDatepicker(this.$el, 'setMinYear', year) },
setMaxYear(year) { duDatepicker(this.$el, 'setMaxYear', year) },
setPriorYears(years) { duDatepicker(this.$el, 'setPriorYears', years) },
setLaterYears(years) { duDatepicker(this.$el, 'setLaterYears', years) },
setDisabled(dates) { duDatepicker(this.$el, 'setDisabled', dates) },
setDisabledDays(days) { duDatepicker(this.$el, 'setDisabledDays', days) },
setI18n(i18n) { duDatepicker(this.$el, 'setI18n', i18n) },
set(setters) { duDatepicker(this.$el, 'set', setters) }
},
mounted() {
let evtProps = {
Expand Down

0 comments on commit 2babd82

Please sign in to comment.