Date picker for metadata

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
Posts: 3
Joined: Wed May 20, 2020 10:48 am

Date picker for metadata

Post by lukk »

I'm new happy user of Mayan EDMS and I'm trying to configure some metadata on document creation. I want to have to pick a "date received" and "document date" fields with a possibility to pick a date from a popup calendar, not to write it.
I've found this old topic

suggesting that maybe as of now this functionality should be available, but I cannot get it to work.

I'll appreciate your help, thanks.
Posts: 2
Joined: Sat Dec 26, 2020 6:16 pm

Re: Date picker for metadata

Post by develissimo »


We try to achieve the same functionality. Having a date picker available.
Seems not available yet.

will report back as soon i have a solution.

Kind regards,
docker-image Mayan-EDMS Version 3.5.4
Evaluation setup
User avatar
Posts: 624
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico

Re: Date picker for metadata

Post by rosarior »

We have worked on solutions and received submission for these but they only provide cosmetic improvements (namely the form widget). The actual stored metadata value continues to be a string and not a proper date object.

The other issue with date pickers we encountered was since these since these are only cosmetic, the picker JavaScript code does not have access to the user locale stored in the backend and will only allow US formatted dates only with no chance to change it. Sending that information via the form context is possible but it would be just a hack. What we need is to find a solution to properly change the metadata value column type at the database level. This way, the data type, the arguments of the data type, and the actual values will be properly stored and the retrieve for display and search will work properly. Typecasting the value into JSON works but then search breaks and the metadata cannot be directly queried.

Django's ORM does not support mutable model fields by default, there are libraries that add these using different methods, one of them being using runtime Django migrations. Neither of these are popular and switching the whole project to use them is too risky as they could go unmaintained. We will need for one of these libraries to become widely used and with reach a healthy number of contributor or for Django to ship and official mutable model field feature for metadata widgets to be fully implemented.
Post Reply