zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
26.91k stars 1.88k forks source link

How to add calendar widget? #909

Open jbhanks opened 4 years ago

jbhanks commented 4 years ago

I am trying to figure out how to embed the javascript calendar widget in trilium note so that I can use it. I found the calendar widget at https://github.com/zadam/trilium/blob/master/src/public/javascripts/widgets/calendar.js

When I create a JS frontend (or backend) note, an x appears before the first line saying Parsing error: 'import' and 'export' may appear only with 'sourceType: module.

What do I need to do to get this widget working?

zadam commented 4 years ago

Calendar widget automatically appears on day notes? Where do you want to put it instead?

jbhanks commented 4 years ago

I was trying to embed a calendar in a note itself so that it would be bigger, but the way it is works fine. Is there any way to have the calendar itself show items that are entered for days (or at least highlight days that have entries?)

zadam commented 4 years ago

Is there any way to have the calendar itself show items that are entered for days (or at least highlight days that have entries?)

No, calendar widget is currently pretty simplistic. It would be possible to create a customer widget though with some scripting ...

jbhanks commented 4 years ago

If I did that, could I create new calendars in new notes? Actually, I'm not sure how to create new calendars with the existing widget, it would be nice to have a couple of separate calendars for different things.