Skip to content

Build your personal knowledge base with Trilium Notes

feat(calendar_view): set first day of the week based on option

Elian Doran9d9b45cafb4a
diff --git a/src/public/app/widgets/view_widgets/calendar_view.ts b/src/public/app/widgets/view_widgets/calendar_view.ts
index f2dbaa9715..ebb987839f 100644
--- a/src/public/app/widgets/view_widgets/calendar_view.ts
+++ b/src/public/app/widgets/view_widgets/calendar_view.ts
@@ -4,8 +4,8 @@ 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 type { EventDragStopArg, EventResizeDoneArg } from "@fullcalendar/interaction";
import { t } from "../../services/i18n.js";
+import options from "../../services/options.js";
const TPL = `
<div class="calendar-view">
@@ -83,7 +83,8 @@ export default class CalendarView extends ViewMode {
week: t("calendar_view.week"),
day: t("calendar_view.day"),
list: t("calendar_view.list")
- }
+ },
+ firstDay: options.getInt("firstDayOfWeek") ?? 0
});
calendar.render();