dspace-angular icon indicating copy to clipboard operation
dspace-angular copied to clipboard

Wrong prefix added to the year of a date input type in submission

Open francescopioscognamiglio opened this issue 1 year ago • 0 comments

Describe the bug The date input type added a prefix 00XX if you fill just XX. It seems to be a strange approach that could be fixed.

To Reproduce Steps to reproduce the behavior:

  1. Open the DSpace 7 demo https://demo.dspace.org/
  2. Login with the administrator or a submitter
  3. Start submitting an item (for instance a Publication)
  4. Fill the submission field "Date of Issue" with a partial year (for example: 22 to say 2022)
  5. Fill any required field and deposit the item
  6. Open the item: you will see that the year has the prefix 00 and so it's value is 0022

I took a video from the DSpace 7 demo instance: screencast-demo.dspace.org-2024.03.29-14_51_30.webm

Expected behavior There could be to solutions:

  1. I can fill a partial year and the prefix is correctly set (it may be difficult to figure out which prefix to add)
  2. Otherwise it's better to request the full year XXXX, instead of adding a prefix