mirror of
https://github.com/rowyio/rowy.git
synced 2025-12-29 00:16:39 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user