Closed aianzi closed 6 years ago
You will need to change Calendar.vue of component itself, just add a watch function for inputValue, and add this.$emit('input', value), v-model should me work
example please
In Calendar.vue
watch: { currDate () { this.getDateRange() } },
add inputValue watcher
watch: { currDate () { this.getDateRange() }, inputValue (value) { this.$emit('input', value) } },
based on vue 2.2.0+ https://vuejs.org/v2/guide/components.html#Customizing-Component-v-model
updated cf830726ab858990686564ca9c0dd2ec68189729
when I use this component, I can just change the data-inputValue instead of props-value. Then I got data of ''. So could you explain how to get the value? thanks a lot