chore(docs): remove incorrect # or ~ prefix in calendar view
|
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 7.3 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 4.6 KiB |
@@ -1,4 +1,4 @@
|
||||
# Calendar View
|
||||
# Calendar View
|
||||

|
||||
|
||||
The Calendar view of Book notes will display each child note in a calendar that has a start date and optionally an end date, as an event.
|
||||
@@ -30,7 +30,7 @@ Unlike other Book view types, the Calendar view also allows some kind of interac
|
||||
## Interacting with events
|
||||
|
||||
* Hovering the mouse over an event will display information about the note.
|
||||

|
||||

|
||||
* Left clicking the event will go to that note. Middle clicking will open the note in a new tab and right click will offer more options including opening the note in a new split or window.
|
||||
* Drag and drop an event on the calendar to move it to another day.
|
||||
* The length of an event can be changed by placing the mouse to the right edge of the event and dragging the mouse around.
|
||||
@@ -56,8 +56,8 @@ For each note of the calendar, the following attributes can be used:
|
||||
| `#color` | Displays the event with a specified color (named such as `red`, `gray` or hex such as `#FF0000`). This will also change the color of the note in other places such as the note tree. |
|
||||
| `#calendar:color` | Similar to `#color`, but applies the color only for the event in the calendar and not for other places such as the note tree. |
|
||||
| `#iconClass` | If present, the icon of the note will be displayed to the left of the event title. |
|
||||
| `#calendar:title` | Changes the title of an event to point to an attribute of the note other than the title, either a label (e.g. `#assignee`) or a relation (e.g. `~for`). See _Advanced use-cases_ for more information. |
|
||||
| `#calendar:displayedAttributes` | Allows displaying the value of one or more attributes in the calendar like this: <br> <br> <br> <br>`#weight="70" #Mood="Good" #calendar:displayedAttributes="weight,Mood"` <br> <br>It can also be used with relations, case in which it will display the title of the target note: <br> <br>`~assignee=@My assignee #calendar:displayedAttributes="assignee"` |
|
||||
| `#calendar:title` | Changes the title of an event to point to an attribute of the note other than the title, can either a label or a relation (without the `#` or `~` symbol). See _Use-cases_ for more information. |
|
||||
| `#calendar:displayedAttributes` | Allows displaying the value of one or more attributes in the calendar like this: <br> <br> <br> <br>`#weight="70" #Mood="Good" #calendar:displayedAttributes="weight,Mood"` <br> <br>It can also be used with relations, case in which it will display the title of the target note: <br> <br>`~assignee=@My assignee #calendar:displayedAttributes="assignee"` |
|
||||
| `#calendar:startDate` | Allows using a different label to represent the start date, other than `startDate` (e.g. `expiryDate`). The label name **must not be** prefixed with `#`. If the label is not defined for a note, the default will be used instead. |
|
||||
| `#calendar:endDate` | Similar to `#calendar:startDate`, allows changing the attribute which is being used to read the end date. |
|
||||
| `#calendar:startTime` | Similar to `#calendar:startDate`, allows changing the attribute which is being used to read the start time. |
|
||||
@@ -65,7 +65,7 @@ For each note of the calendar, the following attributes can be used:
|
||||
|
||||
## How the calendar works
|
||||
|
||||

|
||||

|
||||
|
||||
The calendar displays all the child notes of the book that have a `#startDate`. An `#endDate` can optionally be added.
|
||||
|
||||
@@ -79,7 +79,7 @@ If editing the start date and end date from the note itself is desirable, the fo
|
||||
|
||||
This will result in:
|
||||
|
||||

|
||||

|
||||
|
||||
When not used in a Journal, the calendar is recursive. That is, it will look for events not just in its child notes but also in the children of these child notes.
|
||||
|
||||
@@ -96,30 +96,28 @@ Based on the `#calendarRoot` (or `#workspaceCalendarRoot`) attribute, the calend
|
||||
* Clicking on the empty space on a date will automatically open that day's note or create it if it does not exist.
|
||||
* Direct children of a day note will be displayed on the calendar despite not having a `dateNote` attribute. Children of the child notes will not be displayed.
|
||||
|
||||

|
||||

|
||||
|
||||
### Using a different attribute as event title
|
||||
|
||||
By default, events are displayed on the calendar by their note title. However, it is possible to configure a different attribute to be displayed instead.
|
||||
|
||||
To do so, assign `#calendar:title` to the child note (not the calendar/book note), with the value being `#name` where `name` can be any label. The attribute can also come through inheritance such as a template attribute. If the note does not have the requested label, the title of the note will be used instead.
|
||||
To do so, assign `#calendar:title` to the child note (not the calendar/book note), with the value being `name` where `name` can be any label (make not to add the `#` prefix). The attribute can also come through inheritance such as a template attribute. If the note does not have the requested label, the title of the note will be used instead.
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
<div class="joplin-table-wrapper"><table><thead><tr><th> </th><th> </th></tr></thead><tbody><tr><td><pre><code class="language-text-x-trilium-auto">#startDate=2025-02-11 #endDate=2025-02-13 #name="My vacation" #calendar:title="name"</code></pre></td><td><img src="5_Calendar View_image.png"></td></tr></tbody></table></div>
|
||||
|
||||
### Using a relation attribute as event title
|
||||
|
||||
Similarly to using an attribute, use `#calendar:title` and set it to `~name` where `name` is the name of the relation to use.
|
||||
Similarly to using an attribute, use `#calendar:title` and set it to `name` where `name` is the name of the relation to use.
|
||||
|
||||
Moreover, if there are more relations of the same name, they will be displayed as multiple events coming from the same note.
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
| `#startDate=2025-02-14 #endDate=2025-02-15 ~for=@John Smith ~for=@Jane Doe #calendar:title="for"` |  |
|
||||
|
||||
Note that it's even possible to have a `#calendar:title` on the target note (e.g. “John Smith”) which will try to render an attribute of it. Note that it's not possible to use a relation here as well for safety reasons (an accidental recursion of attributes could cause the application to loop infinitely).
|
||||
|
||||
| | |
|
||||
| --- | --- |
|
||||
|  |  |
|
||||
| `#calendar:title="shortName" #shortName="John S."` |  |
|
||||