Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2ec2b97
Add slotDuration and slotLabelInterval to Calendar
Mar 2, 2026
7d2f18d
Add attribute names to lib
Mar 2, 2026
4e4bc79
Move hardcoded settings to const
Mar 2, 2026
c5ae555
Update documentation
Mar 2, 2026
65a1931
Update apps/client/src/widgets/collections/calendar/index.tsx
BeatLink Mar 3, 2026
f6f7baf
Alphabetize attribute names
Mar 3, 2026
cef40a2
Merge branch 'main' of github.com:BeatLink/Trilium
Mar 3, 2026
3c97f23
Merge branch 'main' into main
BeatLink Mar 3, 2026
4a14d00
Merge branch 'main' into main
BeatLink Mar 4, 2026
dc8c8a5
Merge branch 'main' into main
BeatLink Mar 5, 2026
bd46b93
Merge branch 'main' into main
BeatLink Mar 6, 2026
39d53b9
Merge branch 'main' into main
BeatLink Mar 7, 2026
0c69042
Merge branch 'main' into main
BeatLink Mar 7, 2026
fb08f39
Merge branch 'main' into main
BeatLink Mar 8, 2026
3351021
Add day view
Mar 8, 2026
26d5bd0
Merge branch 'main' of github.com:BeatLink/Trilium
Mar 8, 2026
618141f
Merge branch 'main' into main
BeatLink Mar 9, 2026
5a2af56
Merge branch 'main' into main
BeatLink Mar 12, 2026
e429958
Merge branch 'main' into main
BeatLink Mar 13, 2026
6fd67c7
Merge branch 'TriliumNext:main' into main
BeatLink Apr 11, 2026
bfb9bc2
Add validation, options menu and updated docs for calendar slot labels
Apr 11, 2026
26056c9
Fix Calendar Slot Options
Apr 11, 2026
cec455f
Merge branch 'main' into main
BeatLink Apr 11, 2026
6f4de05
Fix broken test
Apr 11, 2026
ff85dce
Merge branch 'main' of github.com:BeatLink/Trilium
Apr 11, 2026
8e2b92d
Merge branch 'main' into main
BeatLink Apr 13, 2026
fd76525
Merge branch 'main' into main
BeatLink Apr 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/client/src/widgets/collections/calendar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@
const [ weekNumbers ] = useNoteLabelBoolean(note, "calendar:weekNumbers");
const [ calendarView, setCalendarView ] = useNoteLabel(note, "calendar:view");
const [ initialDate ] = useNoteLabel(note, "calendar:initialDate");
const [ slotDuration ] = useNoteLabel(note, "calendar:slotDuration");

Check failure on line 111 in apps/client/src/widgets/collections/calendar/index.tsx

View workflow job for this annotation

GitHub Actions / Build and Deploy Documentation

Argument of type '"calendar:slotDuration"' is not assignable to parameter of type 'FilterLabelsByType<string>'.

Check failure on line 111 in apps/client/src/widgets/collections/calendar/index.tsx

View workflow job for this annotation

GitHub Actions / Test development

Argument of type '"calendar:slotDuration"' is not assignable to parameter of type 'FilterLabelsByType<string>'.
const [ slotLabelInterval ] = useNoteLabel(note, "calendar:slotLabelInterval");

Check failure on line 112 in apps/client/src/widgets/collections/calendar/index.tsx

View workflow job for this annotation

GitHub Actions / Build and Deploy Documentation

Argument of type '"calendar:slotLabelInterval"' is not assignable to parameter of type 'FilterLabelsByType<string>'.

Check failure on line 112 in apps/client/src/widgets/collections/calendar/index.tsx

View workflow job for this annotation

GitHub Actions / Test development

Argument of type '"calendar:slotLabelInterval"' is not assignable to parameter of type 'FilterLabelsByType<string>'.
const initialView = useRef(calendarView);
const viewSpacedUpdate = useSpacedUpdate(() => setCalendarView(initialView.current));
useResizeObserver(containerRef, () => calendarRef.current?.updateSize());
Expand Down Expand Up @@ -159,6 +161,8 @@
firstDay={firstDayOfWeek ?? 0}
weekends={!hideWeekends}
weekNumbers={weekNumbers}
slotDuration={slotDuration ?? "00:30:00"}
slotLabelInterval={slotLabelInterval ?? "01:00:00"}
Comment thread
BeatLink marked this conversation as resolved.
Outdated
height="90%"
nowIndicator
handleWindowResize={false}
Expand Down
50 changes: 49 additions & 1 deletion docs/User Guide/User Guide/Collections/Calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,55 @@ In the _Collections_ tab in the <a class="reference-link" href="../Basic%20Conc

The following attributes can be added to the Collection type:

<table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><code spellcheck="false">#calendar:hideWeekends</code></td><td>When present (regardless of value), it will hide Saturday and Sundays from the calendar.</td></tr><tr><td><code spellcheck="false">#calendar:weekNumbers</code></td><td>When present (regardless of value), it will show the number of the week on the calendar.</td></tr><tr><td><code spellcheck="false">#calendar:initialDate</code></td><td>Change the date the calendar opens on. When not present, the calendar opens on the current date.</td></tr><tr><td><code spellcheck="false">#calendar:view</code></td><td><p>Which view to display in the calendar:</p><ul><li data-list-item-id="e2cd230dc41f41fe91ee74d7d1fa87372"><code spellcheck="false">timeGridWeek</code> for the <em>week</em> view;</li><li data-list-item-id="eee1dba4c6cc51ebd53d0a0dd52044cd6"><code spellcheck="false">dayGridMonth</code> for the <em>month</em> view;</li><li data-list-item-id="ed8721a76a1865dac882415f662ed45b9"><code spellcheck="false">multiMonthYear</code> for the <em>year</em> view;</li><li data-list-item-id="edf09a13759102d98dac34c33eb690c05"><code spellcheck="false">listMonth</code> for the <em>list</em> view.</li></ul><p>Any other value will be dismissed and the default view (month) will be used instead.</p><p>The value of this label is automatically updated when changing the view using the UI buttons.</p></td></tr><tr><td><code spellcheck="false">~child:template</code></td><td>Defines the template for newly created notes in the calendar (via dragging or clicking).</td></tr></tbody></table>
<table>
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code spellcheck="false">#calendar:hideWeekends</code></td>
<td>When present (regardless of value), it will hide Saturday and Sundays from the calendar.</td>
</tr>
<tr>
<td><code spellcheck="false">#calendar:weekNumbers</code></td>
<td>When present (regardless of value), it will show the number of the week on the calendar.</td>
</tr>
<tr>
<td><code spellcheck="false">#calendar:initialDate</code></td>
<td>Change the date the calendar opens on. When not present, the calendar opens on the current date.</td>
</tr>
<tr>
<td><code spellcheck="false">#calendar:view</code></td>
<td>
<p>Which view to display in the calendar:</p>
<ul>
<li data-list-item-id="e2cd230dc41f41fe91ee74d7d1fa87372"><code spellcheck="false">timeGridWeek</code> for the <em>week</em> view;</li>
<li data-list-item-id="eee1dba4c6cc51ebd53d0a0dd52044cd6"><code spellcheck="false">dayGridMonth</code> for the <em>month</em> view;</li>
<li data-list-item-id="ed8721a76a1865dac882415f662ed45b9"><code spellcheck="false">multiMonthYear</code> for the <em>year</em> view;</li>
<li data-list-item-id="edf09a13759102d98dac34c33eb690c05"><code spellcheck="false">listMonth</code> for the <em>list</em> view.</li>
</ul>
<p>Any other value will be dismissed and the default view (month) will be used instead.</p>
<p>The value of this label is automatically updated when changing the view using the UI buttons.</p>
</td>
</tr>
<tr>
<td><code spellcheck="false">#calendar:slotDuration</code></td>
<td>Sets how long each timeslot is on the calendar. Must have the format "HH:MM:SS". For example, to create timeslots for every 10 minutes, you would set #calendar:slotDuration="00:10:00"</td>
</tr>
<tr>
<td><code spellcheck="false">#calendar:slotLabelInterval</code></td>
<td>Sets how often the timeslots on the calendar should be labeled. Must have the format "HH:MM:SS". For example, to label timeslots every 30 minutes, you would set #calendar:slotLabelInterval="00:30:00"</td>
</tr>
Comment thread
BeatLink marked this conversation as resolved.
Outdated
<tr>
<td><code spellcheck="false">~child:template</code></td>
<td>Defines the template for newly created notes in the calendar (via dragging or clicking).</td>
</tr>
</tbody>
</table>


In addition, the first day of the week can be either Sunday or Monday and can be adjusted from the application settings.

Expand Down
Loading