Skip to content

Commit

Permalink
fix(datepicker): update blur event to input only if there is a value
Browse files Browse the repository at this point in the history
  • Loading branch information
Lisi Linhart committed Jan 11, 2023
1 parent 9194b96 commit 52526e2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/Datepicker/Datepicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@icon-click="handleInputClick"
@clear="handleClear"
@keyup.enter="handleDoneAction"
@blur="handleComponentsInput"
@blur="handleBlur"
/>

<template v-if="isShowTzOffset">
Expand Down Expand Up @@ -61,7 +61,7 @@
:min-date="minDate"
:max-date="maxDate"
:disabled-past="disabledPast"
@update:modelValue="handleComponentsInput"
@update:model-value="handleComponentsInput"
@input-minutes="handleMinutesInput"
/>

Expand Down Expand Up @@ -338,7 +338,12 @@ export default {
this.syncInternalValue(this.modelValue)
},
handleBlur(newValue) {},
async handleBlur(newValue) {
if (newValue.length) {
this.handleComponentsInput(newValue)
}
this.handleDoneAction()
},
handleDoneAction() {
let utcTime
Expand Down Expand Up @@ -389,6 +394,8 @@ export default {
this.$nextTick(() => {
this.closeOverlay()
})
return utcTime
},
handlePreviousMonth() {
Expand Down

0 comments on commit 52526e2

Please sign in to comment.