argenos / nldates-obsidian

Work with dates in natural language in Obsidian
MIT License
477 stars 43 forks source link

Hotkeys for inserting current date do not add dates as wikilinks #126

Open jasht1 opened 1 year ago

jasht1 commented 1 year ago

Thank you very much for this plugin, It is a fantastic time saver!

I use the "Natural Language Dates: insert current date and time" hotkey to timestamp a lot of my work, but would like the ability to chose to add the date as a wiki link by default. image Especially if "add dates as links" is enabled for the rest of the plugin's functionality. image Though perhaps an even more powerful solution would be to have the custom format option support additional syntax like link brackets as currently it behaves like this when wikilink brackets are added: image image Perhaps also have a way to customise the format for 'date & time' like is possible to do with 'date' and 'time' individually.

jasht1 commented 3 months ago

A work around for this is adding \[\[ before and \]\] after in the date formatting section in the settings like so : \[\[YYYY-MM-DD\]\] Though you should then disable the "Add dates as link?" option else you will get 4 sets of square brackets whenever you insert a date any other way.

jasht1 commented 1 month ago

A work around for this is adding \[\[ before and \]\] after in the date formatting section in the settings like so : \[\[YYYY-MM-DD\]\] Though you should then disable the "Add dates as link?" option else you will get 4 sets of square brackets whenever you insert a date any other way.

Note that this work around will break the functionality of Shift+Enter to keep input text as an alias as the plug-in doesn't see your dates as links.

Until the main issue is fixed you must choose between linked hotkey timestamps & "Typing @today Enter will automatically be expanded to the current date. Press Shift at the same time to keep the input text as an alias (e.g. @today → [[202112-27|today]])."