User tests: Successful: Unsuccessful:
Pull Request for Issue #41194 .
Fixing Calendar::filter, to work correctly with non numeric dates.
Apply patch.
Add calendar field somewhere:
<field type="calendar" name="nextdate" format="%a %e %b %Y" filterformat="D j M Y"
translateformat="false" filter="server_utc"
showtime="false" label="Next Date" />
Try edit the date with this field.
Date does not saved
Date saved
Please select:
filterformat
to https://docs.joomla.org/Calendar_form_field_typeCategory | ⇒ | Libraries |
Status | New | ⇒ | Pending |
Yea, but it not for this PR, it is somehow missed earlier.
I just fixing what already there.
Okay, I update the description, or it will be forgoten. does not hurt anyway.
I used the publish_up and publish_down field in com_content article.
Maybe it is the environment or another error in my xml but for me it does not work (tried different combination of attributes as well)
local, Xampp, Win 11, php 8.2,
Result:
Works ine with englisch language. both fields have the required date format and are correct in the database.
But switching to german:
The first value, publish_up works but for publish_down I get:
I see, the problem that PHP do not know German ?
As I see it works only for English "textual dates", no idea what went wrong.
does it worked in past?
Numeric dates should work for every language.
Strange and I don't find a logic behind. Because I have two fields publish_up and publish_down. Publish_up works, publish_down throws this error.
Befor the patch I don't get an error, but as the issue says, the field is not stored at all.
Can you test it with your language?
Maybe it depends on the first character of the days name?
For numeric data I never had problems
The reason is that
Friday 27, Jul 2023
but fail with any other language, example Freitag 27, Jul 2023
will not work.
With default format 27.07.2023
it works, because it a pure "numeric" fromat.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-08-25 12:33:38 |
Closed_By | ⇒ | Fedik | |
Labels |
Added:
Documentation Required
bug
PR-4.3-dev
?
|
Documentation for this is required as there is no mention of filterformat https://docs.joomla.org/Calendar_form_field_type