Browse Source

fix: DateTime / Time copy empty records

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5847/head
mertmit 2 years ago
parent
commit
fdb3bb502d
  1. 5
      packages/nc-gui/composables/useMultiSelect/index.ts

5
packages/nc-gui/composables/useMultiSelect/index.ts

@ -142,8 +142,9 @@ export function useMultiSelect(
columnObj.uidt === UITypes.DateTime ? constructDateTimeFormat(columnObj) : constructTimeFormat(columnObj),
)
if (columnObj.uidt === UITypes.DateTime && !dayjs(textToCopy).isValid()) {
throw new Error('Invalid DateTime')
if (!dayjs(textToCopy).isValid()) {
// return empty string for invalid datetime / time
return ''
}
}

Loading…
Cancel
Save