Browse Source

fix(nc-gui): handle copy n paste datetime for ext db

pull/5601/head
Wing-Kam Wong 1 year ago
parent
commit
fd6e7449a9
  1. 4
      packages/nc-gui/composables/useMultiSelect/index.ts

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

@ -117,11 +117,15 @@ export function useMultiSelect(
}
if (columnObj.uidt === UITypes.DateTime) {
if (isXcdbBase(meta.value?.base_id)) {
if (isMssql(meta.value?.base_id)) {
textToCopy = dayjs(textToCopy).format(constructDateTimeFormat(columnObj))
} else {
textToCopy = dayjs(textToCopy).utc(true).local().format(constructDateTimeFormat(columnObj))
}
} else {
textToCopy = dayjs(textToCopy).format(constructDateTimeFormat(columnObj))
}
if (!dayjs(textToCopy).isValid()) {
throw new Error('Invalid Date')

Loading…
Cancel
Save