View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0023578||mantisbt||documentation||public||2017-11-02 03:51||2017-12-06 05:01|
|Target Version||2.9.0||Fixed in Version||2.9.0|
|Summary||0023578: Document need for consistency between "normal" and "datepicker" date formats|
Original issue summary: Odd display in project version date after upgrading from 1.1.2 -> 1.3.12 -> 2.7.1
In my installation, after following the upgrade path noted above, if I attempt to edit the Date Order value, I notice that it is formatted in an odd way, and looking at the HTML, the date picker seems to be using the value attribute as a literal value for the data-picker-format to format.
<input id="proj-version-date-order" name="date_order" class="datetimepicker input-sm" data-picker-locale="en-us" data-picker-format="Y-MM-DD HH:mm" size="16" value="14 12 2017 09:30" style="" type="text">
My configuration contains the following:
$g_datetime_picker_format is commented out because it causes further problems.
|Tags||No tags attached.|
Datetime picker screenshot.
I believe this is due to the inconsistency between the MantisBT date format (
Given the date 14.12.2017 in your screenshots as an example, the day becomes the year (14), and the year (2017) is truncated to 2 chars and becomes the day (20).
I suggest you try setting $g_datetime_picker_format as appropriate to match your normal date format (at least in the order of the date's elements, d/m/y).
Finally, with regards to `$g_datetime_picker_format = "D MMM Y H:mm"; causing further problems , I just tried this locally and it seems to work just fine AFAICT so I'm not sure what your problem is.
Changing my configuration to:
results in the expected date and datetime picker display. Is it a requirement of Mantis that
The following configuration causes Mantis to misinterpret the values in the Date Order field:
the normal format is configured with a numeric month with leading zeros, while the picker format's month is e.g. "Jan".
In any case, I fail to understand why you would want to use different formats to display dates. Doesn't make sense to me.
I updated the Admin Guide to reflect the need for $g_normal_date_format and $g_datetime_picker_format to be consistent.
Just for reference, I want to use the following two formats, the shorter one for where space is a priority, the longer one for where I want clarity first:
The places where the different date formats are used can only be changed in the source code, but you still need to maintain the consistency between $g_datetime_picker_format align and $g_normal_date_format.
With regards to "where space is a priority", this is why we have short_date_format. Check the docs for more info on where each format is used, or look at the source.
MantisBT: master eae6f667
2017-11-03 10:09:42Details Diff
|Document need for consistency in date formats
$g_datetime_picker_format and $g_normal_date_format settings need to be
Differences between them may result in unexpected behavior such as an
invalid interpretation of the date by the DateTime picker widget, or
errors trying to save a modified date.
|mod - config_defaults_inc.php||Diff File|
|mod - docbook/Admin_Guide/en-US/config/date.xml||Diff File|
|2017-11-02 03:51||naib||New Issue|
|2017-11-02 03:51||naib||File Added: Screenshot-2017-11-2a.png|
|2017-11-02 03:51||naib||File Added: Screenshot-2017-11-2b.png|
|2017-11-02 03:53||naib||File Added: 2017-11-02 15_38_56-MantisBT.png|
|2017-11-02 03:53||naib||Note Added: 0058112|
|2017-11-02 05:26||dregad||Status||new => feedback|
|2017-11-02 05:26||dregad||Note Added: 0058114|
|2017-11-02 22:56||naib||Note Added: 0058118|
|2017-11-02 22:56||naib||Status||feedback => new|
|2017-11-03 08:16||dregad||Note Added: 0058125|
|2017-11-03 10:13||dregad||Changeset attached||=> MantisBT master eae6f667|
|2017-11-03 10:13||dregad||Assigned To||=> dregad|
|2017-11-03 10:13||dregad||Status||new => resolved|
|2017-11-03 10:13||dregad||Resolution||open => fixed|
|2017-11-03 10:13||dregad||Fixed in Version||=> 2.9.0|
|2017-11-03 10:15||dregad||Severity||minor => text|
|2017-11-03 10:15||dregad||Category||ui => documentation|
|2017-11-03 10:15||dregad||Target Version||=> 2.9.0|
|2017-11-03 10:15||dregad||Note Added: 0058126|
|2017-11-06 00:18||naib||Note Added: 0058142|
|2017-11-06 06:31||dregad||Summary||Odd display in project version date after upgrading from 1.1.2 -> 1.3.12 -> 2.7.1 => Document need for consistency between "normal" and "datepicker" date formats|
|2017-11-06 06:31||dregad||Description Updated||View Revisions|
|2017-11-06 06:31||dregad||Note Added: 0058145|
|2017-11-14 16:03||atrol||Relationship added||related to 0023606|
|2017-11-14 16:04||atrol||Relationship added||related to 0022827|
|2017-12-04 02:17||vboctor||Status||resolved => closed|
|2017-12-06 05:01||atrol||Relationship added||related to 0023701|