Browse Source

fix: set dateTime picker default time to current time always

pull/7173/head
Ramesh Mane 11 months ago
parent
commit
657ec53eac
  1. 5
      packages/nc-gui/components/cell/DateTimePicker.vue

5
packages/nc-gui/components/cell/DateTimePicker.vue

@ -133,6 +133,10 @@ watch(
(next) => { (next) => {
if (next) { if (next) {
onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, () => (open.value = false)) onClickOutside(document.querySelector(`.${randomClass}`)! as HTMLDivElement, () => (open.value = false))
if (!modelValue) {
localState.value = dayjs(new Date())
}
} else { } else {
editable.value = false editable.value = false
} }
@ -264,6 +268,7 @@ const isColDisabled = computed(() => {
<template> <template>
<a-date-picker <a-date-picker
v-model:value="localState" v-model:value="localState"
:default-picker-value="dayjs(new Date())"
:disabled="isColDisabled" :disabled="isColDisabled"
:show-time="true" :show-time="true"
:bordered="false" :bordered="false"

Loading…
Cancel
Save