diff --git a/app/src/protyle/render/av/cell.ts b/app/src/protyle/render/av/cell.ts index 16ebcdd2b..cc42454bb 100644 --- a/app/src/protyle/render/av/cell.ts +++ b/app/src/protyle/render/av/cell.ts @@ -725,11 +725,15 @@ const renderRollup = (cellValue: IAVCellValue) => { text = cellValue?.number.formattedContent || cellValue?.number.content.toString() || ""; } else if (cellValue.type === "date") { const dataValue = cellValue ? cellValue.date : null; - if (dataValue && dataValue.isNotEmpty) { - text += dayjs(dataValue.content).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm"); - } - if (dataValue && dataValue.hasEndDate && dataValue.isNotEmpty && dataValue.isNotEmpty2) { - text += `${dayjs(dataValue.content2).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm")}`; + if (dataValue.formattedContent) { + text = dataValue.formattedContent + } else { + if (dataValue && dataValue.isNotEmpty) { + text = dayjs(dataValue.content).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm"); + } + if (dataValue && dataValue.hasEndDate && dataValue.isNotEmpty && dataValue.isNotEmpty2) { + text = `${dayjs(dataValue.content2).format(dataValue.isNotTime ? "YYYY-MM-DD" : "YYYY-MM-DD HH:mm")}`; + } } if (text) { text = `${text}`; diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts index e83bfcaf7..ba9dee329 100644 --- a/app/src/protyle/render/av/openMenuPanel.ts +++ b/app/src/protyle/render/av/openMenuPanel.ts @@ -887,7 +887,11 @@ export const openMenuPanel = (options: { event.stopPropagation(); break; } else if (type === "goSearchRollupCalc") { - openCalcMenu(options.protyle, target, {data, colId: options.colId, blockID}); + openCalcMenu(options.protyle, target, { + data, + colId: options.colId || menuElement.querySelector(".b3-menu__item").getAttribute("data-col-id"), + blockID + }); event.preventDefault(); event.stopPropagation(); break;