Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/11973

Vanessaff8a8ac8bd9e
diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts
index 8bfefffc0c..5a020c06d0 100644
--- a/app/src/protyle/render/av/cell.ts
+++ b/app/src/protyle/render/av/cell.ts
@@ -170,17 +170,34 @@ export const genCellValue = (colType: TAVCol, value: string | any) => {
}
};
} else if (colType === "date") {
- cellValue = {
- type: colType,
- date: {
- content: null,
- isNotEmpty: false,
- content2: null,
- isNotEmpty2: false,
- hasEndDate: false,
- isNotTime: true,
- }
- };
+ const dateObj = dayjs(value)
+ if (isNaN(dateObj.valueOf())) {
+ cellValue = {
+ type: colType,
+ date: {
+ content: null,
+ isNotEmpty: false,
+ content2: null,
+ 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") {
cellValue = {
type: colType,