Browse Source

chore/gui-v2-date-picker-fixed-clearing-issue

pull/2883/head
Muhammed Mustafa 2 years ago
parent
commit
2c5e19782f
  1. 5
      packages/nc-gui-v2/components/cell/DatePicker.vue

5
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'))
}

Loading…
Cancel
Save