Skip to content

Commit

Permalink
fix: use refs instead of children array
Browse files Browse the repository at this point in the history
  • Loading branch information
acupofspirt committed Jan 21, 2019
1 parent 0465f2e commit f43e3a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<calendar-panel
v-if="!range"
v-bind="$attrs"
ref="calendarPanel"
:type="innerType"
:date-format="innerDateFormat"
:value="currentValue"
Expand All @@ -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]"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f43e3a3

Please sign in to comment.