diff --git a/src/components/VnTable/VnColumn.vue b/src/components/VnTable/VnColumn.vue
index da4687d32..3af58226f 100644
--- a/src/components/VnTable/VnColumn.vue
+++ b/src/components/VnTable/VnColumn.vue
@@ -78,7 +78,7 @@ const defaultComponents = {
date: {
component: markRaw(VnInputDate),
attrs: {
- readonly: true,
+ readonly: !$props.isEditable,
disable: !$props.isEditable,
style: 'min-width: 125px',
class: 'fit',
diff --git a/src/components/common/VnInputTime.vue b/src/components/common/VnInputTime.vue
index def5dda51..a6c7f1db5 100644
--- a/src/components/common/VnInputTime.vue
+++ b/src/components/common/VnInputTime.vue
@@ -41,11 +41,16 @@ const formattedTime = computed({
let time = value;
if (time) {
if (time?.length > 5) time = dateToTime(time);
+ else {
+ time = time.padEnd(5, '0');
+ if (!time.includes(':'))
+ time = time.substring(0, 2) + ':' + time.substring(3, 4);
+ }
if (!props.timeOnly) {
const hours = time.split(':');
const date = new Date(model.value);
- date.setHours(hours[0], hours[1], 0);
- time = date.toISOString();
+ date.setHours(hours[0] ?? 0, hours[1] ?? 0, 0);
+ time = date?.toISOString();
}
}
model.value = time;
@@ -74,6 +79,7 @@ watch(
:class="{ required: $attrs.required }"
style="min-width: 100px"
:rules="$attrs.required ? [requiredFieldRule] : null"
+ @click="isPopupOpen = false"
>
-
+
@@ -114,3 +126,7 @@ watch(
border-style: solid;
}
+
+ es:
+ Open time: Abrir tiempo
+