diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 0507fddfb..b49fc0158 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -51,6 +51,7 @@ const validateAndCleanInput = (value) => { const manageDate = (date) => { inputValue.value = date.split('/').reverse().join('/'); + formatDate(); isPopupOpen.value = false; }; @@ -170,7 +171,7 @@ const handleEnter = (event) => { :input-style="{ color: textColor }" @click="isPopupOpen = !isPopupOpen" @keydown="isPopupOpen = false" - @blur="formatDate" + @focusout="formatDate" @keydown.enter.prevent="handleEnter" hide-bottom-space :data-cy="($attrs['data-cy'] ?? $attrs.label) + '_inputDate'"