DSPaul / COMPASS

TTRPG resource manager, bringing all your books, maps, etc. in one place.
https://www.compassapp.info
GNU General Public License v3.0
78 stars 8 forks source link

Adding a date that's only a year #40

Open Mifgan opened 1 year ago

Mifgan commented 1 year ago

Describe the bug When I add a date to a file (edit or bulk edit) that's only in a YYYY format instead of a DD/MM/YYYY format, it doesn't save it.

Expected behavior Incomplete dates ie MM/YYYY or YYYY get accepted too.

System info (please complete the following information):

DSPaul commented 1 year ago

The date picker that is used right now doesn't support that behaviour as far as I am aware and I think this is true for a lot of them so fixing this will either require finding one that does (which might not exist) but that will add more dependencies which I am trying to avoid or writing one from scratch which is a massive amount of work because data pickers are quite complex controls.

Even if the UI supported months and years without a date, it would default to something like 1/1/YYYY so that it can be compared to other dates for sorting purposes so I would recommend as a workaround for now to just manually do the same. Just set it to the first of the month/year.

Mifgan commented 1 year ago

Thanks for the answer! I'll see if I do 1/1/YYYY or just not adding the dates at all.

DraftDodger42 commented 1 year ago

Semi-related, could we get a preference option to change the date format? I would like to just display the year, for example.