PKM-er / obsidian-zotlit

A third-party project that aims to facilitate the integration between Obsidian.md and Zotero, by providing a set of community plugins for both Obsidian and Zotero.
https://zotlit.aidenlx.top
MIT License
647 stars 29 forks source link

it.date Displaying Only Year Value #265

Open omargharb opened 10 months ago

omargharb commented 10 months ago

The Zotero program itself displays a full date, but when opening the live preview for Template editing, the right most tab displays only the year under the "date:" section. See pictures for example.

The only thing I can possibly think of is that the first ever file I tried to use this plugin with happened to have only a date and no other information, but I really really can't imagine that's it.

Thanks for this incredible plugin! Plugin-Date

omargharb commented 10 months ago

Just for anyone who may be reading this in the future, you can edit the main.js file to replace the following:

M.fieldName==="date"&&(k=nl(k).split("-")[0])

with

M.fieldName==="date"&&(k=nl(k))

I'm not sure why Zotlit did this by default, but there may be a good reason I'm unaware of. I have not encountered any problems so far, though.

ParkerRobb commented 8 months ago

I have the same request to default to full date.

Thanks for the workaround, @omargharb.

ParkerRobb commented 8 months ago

Turns out this is a duplicate of #204 and #202