Browse Source

fix(nc-gui): handle non month date format

pull/6870/head
աɨռɢӄաօռɢ 12 months ago
parent
commit
22aa22dbec
  1. 4
      packages/nc-gui/components/cell/DatePicker.vue

4
packages/nc-gui/components/cell/DatePicker.vue

@ -63,7 +63,9 @@ const localState = computed({
return undefined return undefined
} }
return dayjs(/^\d+$/.test(modelValue) ? +modelValue : modelValue, dateFormat.value) const format = picker.value === 'month' ? dateFormat : 'YYYY-MM-DD'
return dayjs(/^\d+$/.test(modelValue) ? +modelValue : modelValue, format)
}, },
set(val?: dayjs.Dayjs) { set(val?: dayjs.Dayjs) {
if (!val) { if (!val) {

Loading…
Cancel
Save