User tests: Successful: Unsuccessful:
The current implementation of the calendar field does not allow for customizing the date format. This change gives the user control over how to display the dates. In The Netherlands we require a date in the format of day - month - year, which is now nearly impossible to achieve.
I have kept the current default values as-is so we stick to B/C.
Birthdate
Birthdate
field%d-%m-%Y
That I can set the format of the date.
I cannot set the date of the format.
Yes, here: https://docs.joomla.org/J3.x:Adding_custom_fields/Calendar_Field
@brianteeman Can you please check the language strings.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Language & Strings Front End Plugins |
Labels |
Added:
?
?
|
@brianteeman I actually copied it from the documentation to be complete.
Documentation belongs in documentation not in the ui
Be explicit wherever necessary but don't explain the obvious. On the web scanning is the norm and too much text weakens the effectiveness of the message - it does not enhance it.
@brianteeman Thanks for the feedback, language file updated accordingly.
I have tested this item
The date format changed in the admin but when it was displayed in the front end it was still in the native format
For me it is confusing that this field now uses two different date formats and syntax
The default date field uses YYYY-MM-DD format
The new field uses php %y-%m-%d format
I fixed all your findings.
As for the different formats, if we are going the route of using YYYY-MM-DD we should develop our own flavor of date formats to match the PHP format. This is the wrong direction if you ask me.
If we do change the YYYY-MM-DD to the PHP format, we have a B/C break. All I can think of is that we add the PHP format to this field as well.
I have no idea why this field is different from other date fields in Joomla.
I believe we use the YYYY-MM-DD format here and in lots of other places because thats the mysql date format
Actually, this shouldn't be needed at all, and we deliberately decided against adding a custom format parameter when we created the field.
The calendar should use the language strings to display the date. If it shows the wrong format, then likely the dutch language has an issue, not the custom field.
Check what values these strings have in your language pack:
joomla-cms/administrator/language/en-GB/en-GB.ini
Lines 997 to 1000 in ee78080
I'm not sure anymore why there is a reference to DATE_FORMAT_LC5 and DATE_FORMAT_LC4 in the code. It shouldn't be needed at all since the translateFormat feature ignores that format anyway.
Checking the nl_NL language pack, the date format is indeed wrong in there. Not only for the new ones, but also for the old DATE_FORMAT_LC4 - 6 ones.
@roland-d Can you try if the calendar field works when you change those values in the dutch language pack or create a language override for those strings?
Status | Pending | ⇒ | Information Required |
@Bakual I had some time to test and I agree that the date formats are wrong in the Dutch language file. Let's put that aside. So I created a language override of the DATE_FORMAT_LC4 and set it to d-m-Y for both frontend and backend. In the custom field I have set not to show time. When I edit an article that has the calendar field set. The selected date shows up as Y-m-d. That sounds wrong to me.
The LC4 one isn't relevant for the calendar. The fours ones I posted in #22373 (comment) are the ones that have to fit.
I have tested this item
I tested that the current J3.9.2 calendar string is formatted according the language strings. I like to keep date formats consistent. I don't see to use exceptions in a list of dates or else.
I tested that the current J3.9.2 calendar string is formatted according the language strings. I like to keep date formats consistent. I don't see to use exceptions in a list of dates or else.
Closing this as a non-issue. Seems to be fine with the updated language file.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-01-27 20:05:32 |
Closed_By | ⇒ | roland-d |
@roland-d golden rule - if you have to write such a long essay to explain a field then there is something wrong