diff --git a/packages/nc-gui-v2/components/cell/DatePicker.vue b/packages/nc-gui-v2/components/cell/DatePicker.vue index d9e8ced082..4f95466be0 100644 --- a/packages/nc-gui-v2/components/cell/DatePicker.vue +++ b/packages/nc-gui-v2/components/cell/DatePicker.vue @@ -33,6 +33,11 @@ const localState = $computed({ return /^\d+$/.test(modelValue) ? dayjs(+modelValue) : dayjs(modelValue) }, set(val?: dayjs.Dayjs) { + if (!val) { + emit('update:modelValue', null) + return + } + if (val?.isValid()) { emit('update:modelValue', val?.format('YYYY-MM-DD')) }