Browse Source

chore/gui-v2-date-picker-cleanup

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

5
packages/nc-gui-v2/components/cell/DatePicker.vue

@ -33,11 +33,6 @@ const localState = $computed({
return /^\d+$/.test(modelValue) ? dayjs(+modelValue) : dayjs(modelValue) return /^\d+$/.test(modelValue) ? dayjs(+modelValue) : dayjs(modelValue)
}, },
set(val?: dayjs.Dayjs) { set(val?: dayjs.Dayjs) {
if (!val && !columnMeta?.rqd) {
emit('update:modelValue', null)
return
}
if (val?.isValid()) { if (val?.isValid()) {
emit('update:modelValue', val?.format('YYYY-MM-DD')) emit('update:modelValue', val?.format('YYYY-MM-DD'))
} }

Loading…
Cancel
Save