Emit event on input from date selector so parent element can respond
This commit is contained in:
@@ -195,6 +195,12 @@ export default {
|
||||
watch: this.watch,
|
||||
valid: this.isDateValid,
|
||||
})
|
||||
|
||||
this.$emit('date-change', {
|
||||
value: this.formattedDate,
|
||||
name: this.name,
|
||||
valid: this.isDateValid,
|
||||
})
|
||||
},
|
||||
|
||||
_emitChange: function(name, value, valid) {
|
||||
|
@@ -44,10 +44,6 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted: function() {
|
||||
this.$root.$on('field-change', this.handleDateChange)
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleDateChange: function(event) {
|
||||
if (event.name.includes(START_DATE)) {
|
||||
|
Reference in New Issue
Block a user