Blur event not triggered on VTextField

261 views Asked by At

I've created a date/time picker component that is using two VTextField's to enter hour and minute values. There're three events on each field. Two of the events, focus and input do call their respective handlers when triggered. But the blur event does not.

The code for the VTextField is like this:

        <v-text-field
          v-model="minutes"
          class="time-box"
          placeholder="--"
          @blur="setHoursOrMinutes($event)"
          @focus="clearValue($event.target)"
          @input="checkValue($event)"
        />

Thank you!

1

There are 1 answers

0
张文玉 On

Check whether $('blur') event is triggered inside the component, if not, trigger the event inside the component

<input @blur="$emit('blur',your value)"></input>