Emit event from DatePicker component after selecting date for parent component(s)
MODIFY
resources/assets/js/components/DatePicker.vue
resources/assets/js/components/DatePicker.vue
this.month = this.displayMonth
this.date = index
+ // Update
+ this.$emit('DateUpdated', this.form)
+
this.close()
},

MODIFY
resources/assets/js/components/TransactionWizard.vue
resources/assets/js/components/TransactionWizard.vue
</div>
<div class="input">
<label>Date</label>
- <date-picker></date-picker>
+ <date-picker @DateUpdated="onDateUpdate"></date-picker>
<div class="hint mt-05">YYYY-MM-DD</div>
<validation-error v-if="errors.date" :message="errors.date"></validation-error>
<validation-error v-if="errors.day" :message="errors.day"></validation-error>
},
methods: {
+ // Children
+ onDateUpdate(date) {
+ this.date = date
+ },
+
+ //
switchType(type) {
this.type = type

Emit event from DatePicker component after selecting date for parent component(s)