Skip to content

Build your personal knowledge base with Trilium Notes

feat(calendar): set up time grid

Elian Doran757020505912
diff --git a/package-lock.json b/package-lock.json
index 79b89ac0b8..ecdb2de8c3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "trilium",
- "version": "0.92.3-beta",
+ "version": "0.92.4",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "trilium",
- "version": "0.92.3-beta",
+ "version": "0.92.4",
"license": "AGPL-3.0-only",
"dependencies": {
"@braintree/sanitize-url": "7.1.1",
@@ -116,6 +116,7 @@
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
"@electron/rebuild": "3.7.1",
"@eslint/js": "9.22.0",
+ "@fullcalendar/timegrid": "6.1.15",
"@playwright/test": "1.51.0",
"@popperjs/core": "2.11.8",
"@types/archiver": "6.0.3",
@@ -2902,6 +2903,19 @@
"@fullcalendar/core": "~6.1.15"
}
},
+ "node_modules/@fullcalendar/timegrid": {
+ "version": "6.1.15",
+ "resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.15.tgz",
+ "integrity": "sha512-61ORr3A148RtxQ2FNG7JKvacyA/TEVZ7z6I+3E9Oeu3dqTf6M928bFcpehRTIK6zIA6Yifs7BeWHgOE9dFnpbw==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "@fullcalendar/daygrid": "~6.1.15"
+ },
+ "peerDependencies": {
+ "@fullcalendar/core": "~6.1.15"
+ }
+ },
"node_modules/@gar/promisify": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz",
diff --git a/package.json b/package.json
index e7d690db66..0b5aae27e5 100644
--- a/package.json
+++ b/package.json
@@ -173,6 +173,7 @@
"@electron-forge/plugin-auto-unpack-natives": "7.7.0",
"@electron/rebuild": "3.7.1",
"@eslint/js": "9.22.0",
+ "@fullcalendar/timegrid": "6.1.15",
"@playwright/test": "1.51.0",
"@popperjs/core": "2.11.8",
"@types/archiver": "6.0.3",
diff --git a/src/public/app/widgets/view_widgets/calendar_view.ts b/src/public/app/widgets/view_widgets/calendar_view.ts
index 240feaf385..c3ee15c687 100644
--- a/src/public/app/widgets/view_widgets/calendar_view.ts
+++ b/src/public/app/widgets/view_widgets/calendar_view.ts
@@ -3,7 +3,6 @@ import froca from "../../services/froca.js";
import ViewMode, { type ViewModeArgs } from "./view_mode.js";
import type FNote from "../../entities/fnote.js";
import server from "../../services/server.js";
-import ws from "../../services/ws.js";
import { t } from "../../services/i18n.js";
import options from "../../services/options.js";
import dialogService from "../../services/dialog.js";
@@ -102,6 +101,7 @@ export default class CalendarView extends ViewMode {
const { Calendar } = await import("@fullcalendar/core");
const plugins: PluginDef[] = [];
plugins.push((await import("@fullcalendar/daygrid")).default);
+ plugins.push((await import("@fullcalendar/timegrid")).default);
if (isEditable || this.isCalendarRoot) {
plugins.push((await import("@fullcalendar/interaction")).default);
}
@@ -115,7 +115,7 @@ export default class CalendarView extends ViewMode {
const calendar = new Calendar(this.$calendarContainer[0], {
plugins,
- initialView: "dayGridMonth",
+ initialView: "timeGridWeek",
events: eventBuilder,
editable: isEditable,
selectable: isEditable,