obsidian-community / obsidian-full-calendar

Keep events and manage your calendar alongside all your other notes in your Obsidian Vault.
https://davish.github.io/obsidian-full-calendar/
MIT License
780 stars 102 forks source link

Error when creating new event in daily note #535

Open Kryanne opened 8 months ago

Kryanne commented 8 months ago

Please check that this issue hasn't been reported before.

Expected Behavior

When I create an event, even if the diary doesn't exist yet, the calendar will create a daily note for the day with my heading for me.``

Current behaviour

Full calendar created a new diary note but there is no heading, causing error cast

8a692c2c30096635c45846b5eaf5aba

It worked just fine before but all of a sudden it just broke. I tried to uninstall and install the plugin but things still happened. Is it because of the interface of creating daily note?

JavaScript console output

No response

Steps to reproduce

  1. click any day(no daily note) to create a event

Calendar information

Daily Note use heading called 'heading'

Which Operating Systems are you using?

Obsidian Version

1.5.3

Full Calendar Plugin Version

0.10.7

Checks

Possible solution

In creatEvent method when creating a new daily note, add logic to insert the heading manually if the metadata doesn't contain the target heading maybe? I don't know much about js, so forgive me if I'm wrong about anything

Comments

I have used this pulgin for a long time, but it started to act weird in the last couple of days. If you have time plz check this. Thank you very much.

Kryanne commented 8 months ago

I've solved this by adding a template; it works fine now. But I've never used one before, so I am going to leave this issue open.

ngokevin commented 5 months ago

Related https://github.com/davish/obsidian-full-calendar/pull/556

QuAzI commented 1 month ago

I've solved this by adding a template

Which data should present in the template?