leoray24 downloadsInsert dates from quick shortcuts or a keyboard-friendly calendar while editing a note.
Insert a date without leaving the Markdown editor. Type @ or your own trigger to open a calendar and see the exact text that will be inserted. Use the arrow keys, letter shortcuts, or a mouse to select a date.
moment().add(1, "month").endOf("month").The plugin works offline and stores its settings in the current vault.
For a manual install, download main.js, manifest.json, and styles.css from the latest GitHub release. Put the three files in .obsidian/plugins/quick-date-entry/ in your vault, then enable Quick Date Entry under Settings → Community plugins.
在 Obsidian 的 Markdown 编辑器中输入 @,即可在光标旁选择日期。弹窗顶部会预览当前日期的插入文字,确认后用预览中的日期替换触发字符,光标回到编辑器。日历以周一为一周的第一天,支持源码模式和实时预览。
main.js、manifest.json 和 styles.css,放入目标库的 .obsidian/plugins/quick-date-entry/。! 或 @,也可选择中文、English 或跟随 Obsidian。常用日期和日历可分别关闭,两者都关闭时,输入触发字符会和普通输入一样。YYYY-MM-DD,可以填写 YYYY/MM/DD、YYYY年M月D日 或其他 Moment 格式。设置页会实时预览今天的日期。高级公式以 moment() 或指定起始日期的 moment(...) 开始,支持常用的日期链式操作,包括 add、subtract、startOf、endOf、set、day、isoWeekday、week、month 和 year。设置页会预览计算结果。
| 日期 | 公式 |
|---|---|
| 下个月最后一天 | moment().add(1, "month").endOf("month") |
| 两周后的周五 | moment().add(2, "weeks").isoWeekday(5) |
| 下季度第 15 天 | moment().add(1, "quarter").startOf("quarter").add(14, "days") |
| 指定日期再加 3 天 | moment("2026-12-31").add(3, "days") |
更多用法见 Moment.js 日期操作文档。
| 按键 | 操作 | 按键 | 操作 |
|---|---|---|---|
| Q | 今天 | A | 昨天 |
| W | 明天 | S | 前天 |
| E | 后天 | D | 本周一 |
| R | 下周一 | F | 本周五 |
| J | 上个月 | K | 下个月 |
| H | 切换日期格式 | L | 回到今天 |
npm ci
npm run build