Skip to content

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

:rotating_light:

Vanessa09fd48f25abc
diff --git a/app/src/protyle/render/av/date.ts b/app/src/protyle/render/av/date.ts
index fd6694756c..8daf967c1d 100644
--- a/app/src/protyle/render/av/date.ts
+++ b/app/src/protyle/render/av/date.ts
@@ -5,16 +5,16 @@ export const getDateHTML = (data: IAVTable, cellElements: HTMLElement[]) => {
return item;
}
});
- let hasEndDate = true
- let hasMatch = false
+ let hasEndDate = true;
+ let hasMatch = false;
cellElements.forEach((cellElement) => {
data.rows.find(row => {
if (cellElement.parentElement.dataset.id === row.id) {
row.cells.find(cell => {
if (cell.id === cellElement.dataset.id) {
if (!cell.value || !cell.value.date || !cell.value.date.content2) {
- hasEndDate = false
- hasMatch = true
+ hasEndDate = false;
+ hasMatch = true;
}
return true;
}
@@ -24,20 +24,20 @@ export const getDateHTML = (data: IAVTable, cellElements: HTMLElement[]) => {
});
});
if (!hasMatch) {
- hasEndDate = false
+ hasEndDate = false;
}
return `<div>
- <input type="date" class="b3-text-field fn__block">
- <input type="date" class="b3-text-field fn__block${hasEndDate ? "" : " fn__none"}">
+ <input type="datetime-local" class="b3-text-field fn__block">
+ <input type="datetime-local" class="b3-text-field fn__block${hasEndDate ? "" : " fn__none"}">
<button class="b3-menu__separator"></button>
<button class="b3-menu__item">
<span>${window.siyuan.languages.endDate}</span>
<span class="fn__space fn__flex-1"></span>
<input type="checkbox" class="b3-switch fn__flex-center"${hasEndDate ? " checked" : ""}>
</button>
-</div>`
-}
+</div>`;
+};
export const bindDateEvent = (options: { protyle: IProtyle, data: IAV, menuElement: HTMLElement }) => {
-}
+};
diff --git a/app/src/protyle/render/av/openMenuPanel.ts b/app/src/protyle/render/av/openMenuPanel.ts
index 36601ad55b..aaa34ec57d 100644
--- a/app/src/protyle/render/av/openMenuPanel.ts
+++ b/app/src/protyle/render/av/openMenuPanel.ts
@@ -53,14 +53,14 @@ export const openMenuPanel = (options: {
const cellRect = options.cellElements[options.cellElements.length - 1].getBoundingClientRect();
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height);
bindSelectEvent(options.protyle, data, menuElement, options.cellElements);
- const inputElement = menuElement.querySelector("input")
+ const inputElement = menuElement.querySelector("input");
inputElement.select();
inputElement.focus();
} else if (options.type === "date") {
const cellRect = options.cellElements[options.cellElements.length - 1].getBoundingClientRect();
setPosition(menuElement, cellRect.left, cellRect.bottom, cellRect.height);
bindDateEvent({protyle: options.protyle, data, menuElement});
- const inputElement = menuElement.querySelector("input")
+ const inputElement = menuElement.querySelector("input");
inputElement.select();
inputElement.focus();
} else {