Xheldon269 downloadsA compact, space-filling calendar for your daily notes — open or create them from your template, and mark days that match your own highlight rules.
A space-efficient calendar for Obsidian that shows your daily notes, creates them from your template, and highlights days that match your own rules.
It started from the idea behind the popular Calendar plugin, but fixes its biggest annoyance: in a tall or wide pane the classic calendar just stretches a single month and wastes the rest of the space. Better Calendar instead fills the available area with more months while keeping each day cell a comfortable size.
{{title}}, {{date}},
{{date:FORMAT}}, {{time}}, …). The confirmation can be turned off.^## 今日运动 to see at a glance which days you exercised.The core Daily notes plugin must be enabled (Settings → Core plugins → Daily notes). Better Calendar reads its New file location, Date format, and Template file location to find and create your notes.
Ctrl/Cmd-click opens it in a new tab.| Setting | What it does |
|---|---|
| Start week on | First day of the week, or follow the locale default. |
| Confirm before creating new note | Ask before creating a missing daily note. |
| Show week number | Add a week-number column to each month block. |
| Minimum / Maximum day size | Clamp the day-cell edge (px). Drives how many months fit. |
| Month divider / Day hover color | Divider defaults to a theme gray, hover to the theme accent; either can be custom. |
| Override locale | Use a different locale for weekday / month names. |
| Highlights | Regex (+ flags) + color rules; matching days get a colored dot. |
Each rule is a JavaScript regular expression tested against the full text of
the day's note. The g flag is ignored (matching is stateless); m
(multiline) and i (case-insensitive) are useful. Examples:
| Goal | Pattern | Flags |
|---|---|---|
| Mark days with an exercise log | ^## 今日运动 |
m |
| Mark days that mention a book | #reading\b |
i |
This repository contains the plugin source. To build and install it:
npm install
npm run build # produces main.js
Then copy main.js, manifest.json, and styles.css into
<your-vault>/.obsidian/plugins/better-calendar/ and enable Better Calendar
in Settings → Community plugins. (You can also point BRAT
at this repo.)
npm install
npm run dev # esbuild watch → rebuilds main.js on change
npm run typecheck # tsc --noEmit
The code is split into small modules: pure grid math (layout.ts), daily-note
access (dailyNotes.ts), highlight evaluation + caching (highlights.ts), the
view (view.ts), settings (settings.ts / settingsTab.ts), and the plugin
entry point (main.ts).
MIT