Update TO form and nested components to emit directly to parent components instead of emitting from the root component

This commit is contained in:
leigh-mil
2019-11-07 15:02:20 -05:00
parent 92ce3420b6
commit c94570f83e
14 changed files with 131 additions and 79 deletions

View File

@@ -210,6 +210,10 @@ export default {
dateParsed: function() {
return Date.UTC(this.year, this.month - 1, this.day)
},
valid: function() {
return this.isDateValid
},
},
methods: {
@@ -220,7 +224,7 @@ export default {
valid: this.isDateValid,
})
this.$emit('date-change', {
this.$parent.$emit('field-change', {
value: this.formattedDate,
name: this.name,
valid: this.isDateValid,