Merge pull request #1127 from iamanishroy/import-export-csv-fixes

ROWY-759: test and improve import existing data fieldType detection
This commit is contained in:
Shams
2023-02-22 08:16:51 +01:00
committed by GitHub

View File

@@ -48,7 +48,7 @@ const inferTypeFromValue = (value: any) => {
if (typeof value === "boolean") return FieldType.checkbox;
if (isDate(value)) return FieldType.dateTime;
// trying to convert the value to date
if (+new Date(value)) {
if (typeof value !== "number" && +new Date(value)) {
// date and time are separated by a blank space, checking if time present.
if (value.split(" ").length > 1) {
return FieldType.dateTime;