mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-17 01:21:14 +08:00
This commit is contained in:
parent
2cfbad6390
commit
ff8a8ac8bd
@ -170,17 +170,34 @@ export const genCellValue = (colType: TAVCol, value: string | any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else if (colType === "date") {
|
} else if (colType === "date") {
|
||||||
cellValue = {
|
const dateObj = dayjs(value)
|
||||||
type: colType,
|
if (isNaN(dateObj.valueOf())) {
|
||||||
date: {
|
cellValue = {
|
||||||
content: null,
|
type: colType,
|
||||||
isNotEmpty: false,
|
date: {
|
||||||
content2: null,
|
content: null,
|
||||||
isNotEmpty2: false,
|
isNotEmpty: false,
|
||||||
hasEndDate: false,
|
content2: null,
|
||||||
isNotTime: true,
|
isNotEmpty2: false,
|
||||||
}
|
formattedContent: "",
|
||||||
};
|
hasEndDate: false,
|
||||||
|
isNotTime: true,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
cellValue = {
|
||||||
|
type: colType,
|
||||||
|
date: {
|
||||||
|
content: dateObj.valueOf(),
|
||||||
|
isNotEmpty: true,
|
||||||
|
content2: 0,
|
||||||
|
formattedContent: "",
|
||||||
|
isNotEmpty2: false,
|
||||||
|
hasEndDate: false,
|
||||||
|
isNotTime: dateObj.hour() === 0,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
} else if (colType === "relation") {
|
} else if (colType === "relation") {
|
||||||
cellValue = {
|
cellValue = {
|
||||||
type: colType,
|
type: colType,
|
||||||
|
Loading…
Reference in New Issue
Block a user