Obsidian Calendar Links

To-Do List Calendar Links in Obsidian (Howto incl. Download)

Obsidian, the note-taking app, can do calendars and to-do lists. Let's see, how to integrate it (free download, GitHub)

To-do list calendar links in Obsidian (Templater plugin script, excerpt)

Some people like to work stubbornly through their to-do list. Or they even have several to-do lists and are proud of it.

Else it’s clear: only what’s on the calendar gets done. What is not on the calendar does not exist.

I want to link both worlds.

The note-taking app Obsidian offers a great platform for this.

Unfortunately not as it is. For a slick, pretty much all-needs solution, you have to do it yourself. Using the right plugins, no big deal.

Let’s get started!

(By the way, you can download my complete solution for free from GitHub. Available in two versions. One for German date formats (DE), and one for US-English date formats. See the download links at the end of this article).

The Goal: Cross-link your calendar, from day to day to year to year.

Up front, don’t be alarmed: the design shown here in all the illustrations is my own.

I like it. At the moment. But of course, you have all the freedom to choose any other Obsidian theme that you like.

Then all this will look completely different. But it will work exactly the same.

In my Obsidian vault for download, the Minimal-Theme by Kepano is pre-installed. Set to Default / Dark mode. I modified it with a few CSS snippets. You can select, set or disable both, with a few clicks.

From day to day

Live Preview Example: Calendar note to day, here to 11/17/2022
Live Preview Example: Calendar note to day, here to 11/17/2022

The image above shows as an example the calendar note for Thursday 11/17/2022.

I created it by clicking on the “17” in the month view.

For this, the Obsidian Calendar-Plugin is installed.

Obsidian Calendar Plugin
Obsidian Calendar Plugin

The Calendar-Plugin provides the month view on your calendar.

You can activate it at any time and select a day of the current month. Or, switch to the previous / next month with the buttons left and right of “Today”.

With a click on “Today “, you come back to the current month.

In the left column the calendar weeks are listed.

Clicking on any week number will create a note for that calendar week. But more about that later …

To-do lists for today, this week, this month, this quarter, this year

Live Preview Example: The To-Do List of the Day, here for 11/17/2022
Live Preview Example: The To-Do List of the Day, here for 11/17/2022

Each calendar note contains a to-do list. This always has the same structure, for days, weeks, months, quarters, and years. Only the lists become longer and longer, the larger the period is.

The Plugin Tasks is responsible for the lists. The calendar templates contain the corresponding queries.

In the example above this is still quite boring. If there are no to-dos to be found in the entire vault, that match the query, in the example related to Thursday, 11/17/2022, then it just says “0 Tasks”.

From week to week

Let’s move one level higher.

Either directly in the Calendar month view, by clicking on the “46”.

Or – if we already have the daily note for 11/17/2022 in front of us – simply on “W46”.

Because: the calendar note headers consist of links only (almost)

Live Preview Example: a calendar week note, here W46 / 2022
Live Preview Example: a calendar week note, here W46 / 2022

A note about the calendar week is structured similarly to notes about calendar days.

For example, the headings always end on the right with two indicated arrows.

A click on < leads to the previous entry and a click on > to the following entry. On the same level. So:

  • Day: < Yesterday, > Tomorrow.
  • Week: < previous week, > next week

Below the heading are the links to other levels in the calendar.

Using the example of the note for calendar week W46, as in the image above:

  • above: to the month of November, to the 4th quarter, to the year 2022
  • subordinate: to each individual day of the week

From month to month

Let’s click one level up, from week 46 to the month of November.

Live Preview Example: the note to the calendar month, here: November 2022
Live Preview Example: the note to the calendar month, here: November 2022

The month note actually differs only by the links, in the header, below the headline.

The “body” of all calendar notes is divided into the following sections:

  • NEW
  • Achieved, recognized, decided
  • Done
  • To-Do
    • Due
    • planned
    • Routine
    • Not done
    • Without date

You can expand or collapse any section by clicking on the arrow in front of the heading.

The first two sections are completely blank. Here you can enter whatever is important to you on this day / week / month / quarter / year.

Under NEW I often enter new tasks and ideas that are due later or still to be scheduled.

Under Achieved, Recognized, Decided I keep a kind of diary.

This is where I record my personal achievements: milestones, highs, and lows, landmark decisions … you guessed it, let’s say: this is my journaling.

You can change, delete or add anything here, as you like. It does not change the functionality of the calendar notes, the automatic linking, or the to-do lists.

BUT: with sections “Done” and “To-Do“, caution is advised!

In these sections, the appropriate queries are defined in the templates. If you change these task queries, you better know exactly what you’re doing 🙂

From quarter to quarter

One level up, we end up with the Quarter, in the November example, the 4th quarter of 2022.

Live Preview example: the calendar note for the quarter, here: Q4 / 2022
Live Preview example: the calendar note for the quarter, here: Q4 / 2022

It is no different from the structure of the day, week, and month views, as described above.

In the To-Do list, you might have noticed, one task is already entered, as an example.

  • I have defined the task “Superimportant by tomorrow” in the calendar note as of 11/17/2022
  • Per Tasks plugin, with the keyboard shortcut Ctrl T (Hotkey)
  • filled in the provided form
  • with due date on the following day, 11/18/2022

The way I’ve described the structure of the calendar templates, you won’t be surprised to see this task pop up again and again, in these to-do lists, in the various notes on the day, week, month, quarter, and year.

From year to year

One more level up, in the note on a particular calendar year, here: 2022, all the tasks of the year then appear in the lists. Arranged in the same structure as at the lower levels.

Live Preview example: the note on the calendar year, here: 2022
Live Preview example: the note on the calendar year, here: 2022

As shown in the image above, there are again the links to the previous and following years and the links to the 12 months of the current year.

In the example shown, the links to the 4th quarter Q4 and to November (11) are shown differently than all other links.

What is this all about?

In Obsidian, all these calendar links are internal links, pointing to note files in the current vault, your Obsidian data folder. Obsidian treats such links differently from external links (which are those including a URL to the Internet).

If the target file exists, Obsidian opens that note and changes the view.

If the target file doesn’t exist, Obsidian creates a note with that file name. If there is a template assigned, the appropriate template is applied, which creates the initial content. And Obsidian switches to the new note, as the result of the template.

Different from many themes, it is important to me to see at a glance which files already exist, and which do not. That’s why I modified the styling, using a custom CSS snippet.

So in the example above you can see that the links to the 4th Quarter (Q4) and November (11) lead to notes that already exist. All other links are displayed differently because the corresponding notes do not yet exist.

Everything is a note

Up to this point, I’ve described what I mean by calendar links, with built-in to-do lists that automatically adjust to whatever view you have of the calendar. Depending on how much experience you already have with Obsidian and the plugins I mentioned, you might want to skip to the end of this post right now, download the Vault and try it out for yourself.

For everyone else, here’s more detail on the question:

How does it work?

As it should be for a note-taking app like Obsidian, everything is a note first. Even an entry in the calendar. To

  • every calendar day,
  • every calendar week
  • every calendar month
  • each calendar quarter
  • each calendar year

a note can be created. For these 5 categories, you can create templates, e.g. to structure all your calendar notes according to your needs. That means you create e.g. headings, checklists, and the like.

Sorted into folders

You could put all these calendar notes in a common folder. 365 days, 52 weeks, 12 months, 4 quarters, and one annual note, that is 434 notes per year. Could get confusing.

I solved it like this: a folder CALENDAR with the subfolders

  • DAYS
  • WEEKS
  • MONTHS
  • QUARTERS
  • YEARS

This also makes it easier to set the plugins used.

The capital letters are a quirk of mine personally. I just like to see it right away: Ouch! THAT is a FOLDER! 🙂

To-do lists in Obsidian

Obsidian is based on plain text files in Markdown format. And Markdown includes a format for a special form of line of text:

- [ ] Do something important

Means: a line of text that starts with the character string:

  • Hyphen
  • Space
  • Square bracket on
  • Space
  • Square bracket closed
  • Space

denotes

  • an item of a checklist (checkpoint)
  • respectively a task (To-Do)

Both are already prepared for checking off.

To do this, simply replace the space between the square brackets with any other character, usually an “x”.

With this, the item / task / to-do is “checked off” as

done / checked / approved / OK.

In Obsidian – depending on which theme is active – in Live-Preview and Reading mode, this “checkmark” is mostly shown as a green icon.

So a To-Do-List can be displayed in Obsidian quite simply as a Checklist:

- [ ] Do this

- [ ] Then that

- [ ] And when you are done with it, then: ...

Some Obsidian plugins build on this, e.g.

  • Dataview
  • Tasks
  • Checklist
  • Projects
  • Kanban
  • Cardboard

My solution for to-do lists with calendar links is based on Dataview and Tasks. More about that later.

This doesn’t mean that the other plugins mentioned can’t be used in parallel or additionally.

Only, at the moment, in my current solution, this is not the case.

Tasks

The Markdown checkpoints or tasks have a decisive advantage: they can be set in any note (file). So it needs

no special to-do note or to-do list note

So, whatever task comes to your mind

  • just write it into any note
  • in the markdown line format described above
  • somewhere in the Obsidian Vault

and leave it to Obsidian to look for it.

The Plugin Dataview for example can search all notes in your current Obsidian folder (Vault) for such “task lines”. And if you append a

  • Due date
  • Scheduled date or
  • Start date

Dataview lists all tasks due / scheduled / starting on today’s date (we will come back to this, later on).

The plugin Obsidian-Tasks can do this as well, but additionally gives you the possibility to

  • define tasks as recurring

Furthermore, Obsidian-Tasks facilitates

  • the input / definition / dating / modification of a task via form and hotkey
  • the “natural” language for task-related queries

Everything can be achieved – as well

  • directly in the Markdown text or
  • in Dataview Query Language (DQL) or
  • in JavaScript Code

But this certainly feels more like programming, which isn’t everyone’s cup of tea.

Templates

Speaking of programming (or: coding 🙂 ) – let’s get into the slightly more complicated part, the templates.

We need 5 templates, one for each CALENDAR folder.

But don’t get scared. Basically, it’s one template that we customize a bit for the day, week, month, quarter, and year. We’ll get to that in detail in a moment.

First:

What are templates?

I don’t know what Wikipedia says about it. Let me put it this way: templates are

  • either patterns for content and its formatting
  • or macros (programs, scripts) for automatic processes.

Templates include, for example, text modules for

  • code blocks
  • tables
  • checklists
  • outlines
  • standard notes
  • especially in Obsidian: Frontmatter (YAML)
  • especially with Dataview: Inline Fields

Macros automate anything, including e.g.

  • the automatic insertion of the creation date and time
  • the automatic update of the modification date and time

For Obsidian, I currently know of two plugins that allow such templates or macros:

  • TemplateS, one of the core plugins for Obsidian.
  • TemplateR, one of the community plugins for Obsidian

With TemplateS you can do something like date and time stamps. Not much more.

With TemplateR you can almost build a new Obsidian. Depending on how good you are with JavaScript 🙂

I tried TemplateS briefly. Instead, I went with TemplateR from the beginning. Like Dataview, it’s one of the plugins that really make Obsidian Obsidian, in my opinion.

If you are interested in what Templater can do for you, beside my solution for to-do calendar links, I recommend the YouTube video by Nicole van der Hoeven (link at the end of the article).

Calendar templates for Obsidian

My five calendar templates are built according to one common scheme. If you know what to look for, you will quickly recognize it. Although at first glance – admittedly – it looks more like a jungle 🙂

The structure of the 5 calendar templates for obsidian-calendar-links (DE)
The structure of the 5 calendar templates for obsidian-calendar-links

The first block from line 1 to line 67 is also called frontmatter.

This block starts and ends with three hyphens each and must be right at the beginning of a template (or in general: of an Obsidian note file).

Line 2 to 4 are fields in YAML format:

field name: field value

In the calendar templates currently, only the first YAML line is filled in. The created field automatically gets the date and time when the file is initially created.

The string <% indicates that the Plugin Templater is engaged. The command is ending with %>.

In line 2 of the calendar template Templater is instructed to insert the date and time, in the specified format, e.g.

Thursday, November 17, 2022

The 3 YAML lines are followed by another block for Templater, this time embedded between

<%*

and

-%>

The asterisk at the beginning tells Templater that everything that follows is to be considered JavaScript.

The hyphen at the end signals, the whole block can disappear after it has been processed. Otherwise, the result would contain a lot of empty lines.

I’ll leave out more details about JavaScript at this point.

Only this much:

In the first sections of the JavaScript block the date formats are defined. This part is identical in all 5 calendar templates.

Predefined are the formats common in US-English.

(Alternativ gibt es auf GitHub auch eine Version mit deutschen Datumsformaten)

Since Templater includes the well-established JavaScript library moment.js, any other date formats can easily be set up, as well (all links at the end of this post).

Calendar DAY Template

Now switch from Edit to Live Preview mode, e.g. by hotkey Ctrl E.

Suddenly the template looks tidy!

C DAY Template in Live Preview mode: header and links
C DAY Template in Live Preview mode: header and links

The first lines in – say: dark white – are

  • the filename, here: C DAY Template
  • an error message, here: Metadata (Invalid YAML)
  • the path and the full name of the note file
  • here: TP/C DAY Template.md
  • the date, and time of the last change to this file
  • here: Thursday, November 10, 2022, 11:41.

This is followed by lines in – say: pale blue-green – with

  • the heading, here: <% dayDate %> < >
  • the internal links to the calendar week, calendar month, quarter, and year (including the number of this day in this year).

You have to ignore the error message. It only appears with the templates, in Live Preview mode. If the template is applied, everything is fine.

The Plugin Dataview is responsible for the path and the modification date.

Why not Templater … just leads toooo far here 🙂

Calendar WEEK Template

For the next template, I’ll spare you the introductory words and limit myself to the headline and links.

C WEEK Template in Live Preview mode: links only
C WEEK Template in Live Preview mode: links only

You can tell again by the <%%> brackets that Templater is engaged. If it is only a single word, between the brackets, then this word denotes a variable.

All these variables are calculated beforehand in the JavaScript block, see above.

Calendar MONTH template

From the next calendar template for months I have further reduced the link part.

C MONTH Template in Live Preview mode: links only
C MONTH Template in Live Preview mode: links only

The variable in the last line,

<% monthWeekLinks %>

contains an entire list of values that is compiled in the JavaScript block.

Calendar QUARTER template

The next calendar template for Quarters follows the same principles as before. The only difference is that quarters require a few extra lines in the JavaScript block to compute the appropriate links to months and calendar weeks.

C QUARTER Template in Live Preview mode: links only
C QUARTER Template in Live Preview mode: links only

The trained eye recognizes the variables

<% qMonthLinks %> and

<% qWeekLinks %>

are somehow different from the variable

<% year %>

Obsidian recognizes <% year %> contains an internal link.

The other two variables are compiled. Here Obsidian only “recognizes” a list or a text for the time being.

But! After all, we users don’t care about such nuances 🙂

Calendar YEAR Template

We come to the last calendar template, responsible for year notes.

C YEAR template in Live Preview mode: links only.
C YEAR template in Live Preview mode: links only.

Here, I admittedly didn’t put much effort into summarizing all these links. They’re just there, as they are tumbling out of JavaScript.

Coming soon: Task and project management with Obsidian

This post is already too long. It’s that time again. I can shorten and compress all I want. It just doesn’t all fit in one post.

That’s why in the next few days part 2 will follow. Focussing on task and project management with Obsidian._

For now, I think it became clear in this first part,

  • what my little Vault can do for you
  • how it feels and
  • how it is built

Enough incentive, hopefully, for you to click on the download link in the next chapter and try it out for yourself.

Downloads

Both versions can be easily translated into other languages. Also, the date formats can be easily customized.

For each version, there is a ReadMe file that describes how to install the Obsidian vault / open it with the Obsidian app.

All included files can already be viewed on the GitHub page and can also be downloaded individually if needed.

Further links

More about the note app Obsidian

Read more about the wonderful note-taking app Obsidian (Obsidian.md), here on generateCLICKS:

Wolfram Kläger is the author of generateCLICKS, founder and CEO of whkmedia, based in Hannover, Germany. When he's not busy with websites and YouTube, Wolfram can be found with his wife, on the road in their Multivan, or he is looking for a coffee and a buttered pretzel.