Closed alataknet closed 6 years ago
You need to change the source code.
import DatePicker from 'vue2-datepicker'
const init = DatePicker.components.CalendarPanel.methods.init
DatePicker.components.CalendarPanel.methods.init = function () {
init.call(this)
this.panel = 'YEAR'
}
Hello, Thank you. I use the date picker also as a normal date picker. I tried with Vue.nextTick, but I did not find the correct way of doing it
In V2.5.0.
'<date-picker ref="date" @panel-change="handlePanelChange" v-model="value" lang="en" ></date-picker>'
methods: {
handlePanelChange (panel, oldPanel) {
if (oldPanel === 'NONE') {
this.$refs.date.$children[0].panel = 'YEAR'
}
}
}
Thank you very much. Works perfect
Hello How to use vue2-datepicker as a birthday picker, ie: the order of the panels would be Year, Month, and then day ?