@ -52,18 +52,22 @@ For each note of the calendar, the following attributes can be used:
| `#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. |
| `#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. |
| `#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: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:promotedAttributes` | Allows displaying the value of one or more promoted attributes in the calendar like this:  <br><br>`<br>#label:weight="promoted,number,single,precision=1"<br>#label:mood="promoted,alias=Mood,single,text"<br>#calendar:promotedAttributes="label:weight,label:mood" <br>` <br><br>It can also be used with relations, case in which it will display the title of the target note:<br><br>`<br>#relation:assignee="promoted,alias=Assignee,single,text"<br>#calendar:promotedAttributes="relation:assignee" <br>~assignee=@My assignee<br>` |
| `#calendar:displayedAttributes` | Allows displaying the value of one or more attributes in the calendar like this:<br><br><br><br>```<br>#weight="70"<br>#Mood="Good"<br>#calendar:displayedAttributes="weight,Mood"<br>```<br><br>It can also be used with relations, case in which it will display the title of the target note:<br><br>```<br>~assignee=@My assignee<br>#calendar:displayedAttributes="assignee"<br>``` |
| `#calendar:startDate` | Allows using a different label to represent the start date, other than `#startDate` (e.g. `#expiryDate`). The label name must be prefixed with `#`. If the label is not defined for a note, the default will be used instead. |
| `#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` | Allows using a different label to represent the start date, other than `#endDate`. The label name must be prefixed with `#`. If the label is not defined for a note, the default will be used instead. |
| `#calendar:endDate` | Allows using a different label to represent the start date, other than `endDate`. The label name **must not be** prefixed with `#`. If the label is not defined for a note, the default will be used instead. |
## How the calendar works
## How the calendar works
The calendar displays all the child notes of the book that have a `#startDate`. An `#endDate` can optionally be added.

The calendar displays all the child notes of the book that have a `#startDate`. An `#endDate` can optionally be added.
If editing the start date and end date from the note itself is desirable, the following attributes can be added to the book note:
If editing the start date and end date from the note itself is desirable, the following attributes can be added to the book note:
<td>Allows using a different label to represent the start date, other than <code>#startDate</code> (e.g. <code>#expiryDate</code>).
<tr>
The label name must be prefixed with <code>#</code>. If the label is not
<td><code>#calendar:startDate</code>
defined for a note, the default will be used instead.</td>
</td>
</tr>
<td>Allows using a different label to represent the start date, other than <code>startDate</code> (e.g. <code>expiryDate</code>).
<tr>
The label name <strong>must not be</strong> prefixed with <code>#</code>.
<td><code>#calendar:endDate</code>
If the label is not defined for a note, the default will be used instead.</td>
</td>
</tr>
<td>Allows using a different label to represent the start date, other than <code>#endDate</code>.
<tr>
The label name must be prefixed with <code>#</code>. If the label is not
<td><code>#calendar:endDate</code>
defined for a note, the default will be used instead.</td>
</td>
</tr>
<td>Allows using a different label to represent the start date, other than <code>endDate</code>.
</tbody>
The label name <strong>must not be</strong> prefixed with <code>#</code>.
</table>
If the label is not defined for a note, the default will be used instead.</td>
<h2>How the calendar works</h2>
</tr>
<p>
</tbody>
<imgsrc="17_Calendar View_image.png"alt="">The calendar displays all the child notes of the book that have a <code>#startDate</code>.
</table>
An <code>#endDate</code> can optionally be added.</p>
</figure>
<p>If editing the start date and end date from the note itself is desirable,
<h2>How the calendar works</h2>
the following attributes can be added to the book note:</p><pre><codeclass="language-text-x-trilium-auto">#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date" #label:endDate(inheritable)="promoted,alias=End Date,single,date" #hidePromotedAttributes </code></pre>
<p>
<p>This will result in:</p>
<imgsrc="17_Calendar View_image.png"alt="">
<p>
</p>
<imgsrc="14_Calendar View_image.png"alt="">
<p>The calendar displays all the child notes of the book that have a <code>#startDate</code>.
</p>
An <code>#endDate</code> can optionally be added.</p>
<p>When not used in a Journal, the calendar is recursive. That is, it will
<p>If editing the start date and end date from the note itself is desirable,
look for events not just in its child notes but also in the children of
the following attributes can be added to the book note:</p><pre><codeclass="language-text-x-trilium-auto">#viewType=calendar #label:startDate(inheritable)="promoted,alias=Start Date,single,date"