Bug #10726

Date autocomplete helper strips leading zeroes from dates

Added by Dan Gillean about 5 years ago.

Status:NewStart date:01/03/2017
Priority:LowDue date:
Assignee:-% Done:

0%

Category:Usability
Target version:-
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:

Description

  • Create a new description
  • In the dates field, enter a date with leading zeroes - e.g. 2001-01-01 - 2004-03-05
  • Click out of the field so the helper can try to auto-fill the start and end date values
Resulting error
  • Leading zeroes are stripped, though they are technically correct according to ISO 8601 formatting. Dates in start/end field appear as 2001-1-1 and 2004-3-5.

Expected result
AtoM does not strip leading zeroes from date values passed by the helper to start/end date fields.

Note
See note 5 on issue #10716 - currently, on save AtoM is checking and adding the zeroes back IN to make sure the date format is saved correctly. So in the view page, it will display correctly, and in the database the date format will be correct. If you re-enter edit mode, the leading zeroes are now present.

This is therefore a minor issue; essentially though the work done on #10716 now prevents an incorrect date format from being saved as-is, this current behavior sends conflicting messages to the end-user, first stripping out the zeroes while they are in edit mode, and then adding them back in on save.

We should change the helper JS so it is consistent with the desired end-result - e.g. so it no longer strips leading zeroes.


Related issues

Related to Access to Memory (AtoM) - Bug #10716: Acquisition date in accession record behaving oddly Verified 12/06/2016

History

#1 Updated by Dan Gillean about 5 years ago

  • Related to Bug #10716: Acquisition date in accession record behaving oddly added

Also available in: Atom PDF