mdelobelle / metadatamenu

For data management enthusiasts : type and manage the metadata of your notes.
https://mdelobelle.github.io/metadatamenu
MIT License
520 stars 27 forks source link

Can't get desired date format #567

Open SedesGobhani opened 7 months ago

SedesGobhani commented 7 months ago

I have created a fileclass "Log Class" with a Date type field "date". I have set the date format like so: image This reflects the year, work week and day number in week (i.e. 5 = Friday).

Then I created a new note and use the command "Metaadata Menu: Add fileClass to file", and add Log Class. Then I "Insert missing fields in frontmatter". The date field shows up looking like this with the wrong format: image

I use the date picker to change the date, and it lets me select it in my own format, but won't let me save it: image

Is this a malfunction, or am I doing something wrong?

BTW I also found no way to set a default day (e.g. today). I also tried to prepopulate in a template using the {{date}} template variable. If there's a way please let me know. Thanks!

mdelobelle commented 7 months ago

Hi this seems to be a limitation of momentjs "YY\w\wWW.D" is considered as a valid date format, but not "YY\w\wWW.d"

Maybe you could use "YY\w\wWW.DDD" if you want the day of the week instead of the day of the month