From 657ec53eac48ea49961dfd2041e8009a63c704a1 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Thu, 7 Dec 2023 17:47:43 +0530 Subject: [PATCH] fix: set dateTime picker default time to current time always --- packages/nc-gui/components/cell/DateTimePicker.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/nc-gui/components/cell/DateTimePicker.vue b/packages/nc-gui/components/cell/DateTimePicker.vue index fa8a588a4b..bd2780bebd 100644 --- a/packages/nc-gui/components/cell/DateTimePicker.vue +++ b/packages/nc-gui/components/cell/DateTimePicker.vue @@ -133,6 +133,10 @@ watch( (next) => { if (next) { onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, () => (open.value = false)) + + if (!modelValue) { + localState.value = dayjs(new Date()) + } } else { editable.value = false } @@ -264,6 +268,7 @@ const isColDisabled = computed(() => {