Create emitter function for field-change event

This commit is contained in:
leigh-mil
2019-11-13 16:42:03 -05:00
parent bc0382834b
commit 04b9250ea1
9 changed files with 24 additions and 11 deletions

View File

@@ -1,5 +1,6 @@
import Vue from 'vue'
import { getDaysInMonth } from 'date-fns'
import { emitFieldChange } from '../lib/emitters'
let paddedNumber = function(number) {
if ((number + '').length === 1) {
@@ -209,7 +210,7 @@ export default {
methods: {
onInput: function() {
this.$parent.$emit('field-change', {
emitFieldChange(this, {
value: this.formattedDate,
name: this.name,
valid: this.isDateValid,