diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 5a1d5c7f0..a5b47278e 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -2,6 +2,7 @@ import {fetchPost} from "../../../util/fetch"; import {getColIconByType, showColMenu} from "./col"; import {Constants} from "../../../constants"; import {getCalcValue} from "./cell"; +import * as dayjs from "dayjs"; export const avRender = (element: Element, cb?: () => void) => { let avElements: Element[] = []; @@ -37,7 +38,6 @@ ${column.wrap ? "" : "white-space: nowrap;"}">
`; - calcHTML += `
${getCalcValue(column) || '' + window.siyuan.languages.calc}
`; }); @@ -78,7 +78,14 @@ style="width: ${column.width || "200px"}">${getCalcValue(column) || '${text}`; } } else if (cell.valueType === "date") { - text = `${cell.value?.date.content || ""}`; + text = ''; + if (cell.value?.date.content) { + text += dayjs(cell.value.date.content).format("YYYY-MM-DD HH:mm"); + } + if (cell.value?.date.hasEndDate) { + text += `${dayjs(cell.value.date.content2).format("YYYY-MM-DD HH:mm")}`; + } + text += "" } tableHTML += `