diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index dc5410e93..97053184a 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -407,7 +407,7 @@ defineExpose({ diff --git a/src/components/common/VnInputDate.vue b/src/components/common/VnInputDate.vue index 72898483f..d8f41349a 100644 --- a/src/components/common/VnInputDate.vue +++ b/src/components/common/VnInputDate.vue @@ -44,12 +44,15 @@ const formattedDate = computed({ let newDate; if (value) { // parse input - if (value.includes('/') && value.length >= 10) { - if (value.at(2) == '/') value = value.split('/').reverse().join('/'); - value = date.formatDate( - new Date(value).toISOString(), - 'YYYY-MM-DDTHH:mm:ss.SSSZ' - ); + if (value.includes('/')) { + if (value.length == 6) value = value + new Date().getFullYear(); + if (value.length >= 10) { + if (value.at(2) == '/') value = value.split('/').reverse().join('/'); + value = date.formatDate( + new Date(value).toISOString(), + 'YYYY-MM-DDTHH:mm:ss.SSSZ' + ); + } } let ymd = value.split('-').map((e) => parseInt(e)); newDate = new Date(ymd[0], ymd[1] - 1, ymd[2]); @@ -107,7 +110,12 @@ watch( isPopupOpen = false; " /> - + - + + es: + Open date: Abrir fecha +