mirror of
https://github.com/tenrok/vue2-datepicker.git
synced 2026-06-07 12:32:27 +03:00
Merge pull request #234 from acupofspirt/children-array-issue
fix: use refs instead of children array
This commit is contained in:
+3
-2
@@ -63,6 +63,7 @@
|
||||
<calendar-panel
|
||||
v-if="!range"
|
||||
v-bind="$attrs"
|
||||
ref="calendarPanel"
|
||||
:type="innerType"
|
||||
:date-format="innerDateFormat"
|
||||
:value="currentValue"
|
||||
@@ -74,6 +75,7 @@
|
||||
<calendar-panel
|
||||
style="box-shadow:1px 0 rgba(0, 0, 0, .1)"
|
||||
v-bind="$attrs"
|
||||
ref="calendarPanel"
|
||||
:type="innerType"
|
||||
:date-format="innerDateFormat"
|
||||
:value="currentValue[0]"
|
||||
@@ -487,8 +489,7 @@ export default {
|
||||
handleChange (event) {
|
||||
const value = event.target.value
|
||||
if (this.editable && this.userInput !== null) {
|
||||
const calendar = this.$children[0]
|
||||
const checkDate = calendar.isDisabledTime
|
||||
const checkDate = this.$refs.calendarPanel.isDisabledTime
|
||||
if (!value) {
|
||||
this.clearDate()
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user