edit the creation date of an article(1), NOT using the date picker
The supported format is YYYY-MM-DD
Now we enter a date as DD-MM-YYYY
Error message indicating the format is wrong "YYYY-MM-DD" expected, found "XX-XX-DDDD"
(3) the date is stored without warning or error but its a totally unreleated date, 2011-03-12.
This is particulary bad when using "save & close".
j3.9.11
There should be a warning against a wrong pattern. Starting with 4digits is a clear violation. And yes i am aware that there is limited possibilities in distinguishing DD and YY for all usescases.
I first experienced this problem in a propriataray where users enter birthdates. Using the "articles" makes it easier to reproduce
Labels |
Added:
J3 Issue
|
Status | New | ⇒ | Discussion |
I think we had this before and it was related to a broken localise.php in the language pack.
From my initial investigations it is a JS issue caused by the (ancient) datepicker JS library
It's not the same issue we had previously. Back then it was a wrong language string which broke it.
But here it is about validation of the input.
I'd say it should be possible to validate the format of the input using JavaScript and give that expected error message, but I'm the wrong guy to code that.
It's not the same issue we had previously. Back then it was a wrong language string which broke it.
Ah ok - knew i remembered something
So i finally got around to checkin it in alfa11
as can be seen the behaviour is the same erro for J4. @dgrammatiko any insights?
Library used is JSCal2 by Mihai Bazon
media/system/js/calendar.js
$Id: calendar.js,v 1.51 2005/03/07
Onlyu documentatino is online: http://www.dynarch.com/jscal/
Marco have you checked your DB as to what is stored? Because i am having a somewhat similar problem with a JCB component and it displays a seemingly random date but when i check the db it has my default value saved 0000-00-00 instead of the date. Wondering if this is happening here also.
I am new to open source and want to contribute to this issue. I observed that calender field set random value when given value in other format and even time field set value to 00:00:00 when not provided.
I am thinking that this problem can be overcome by defining new class that validate date and not set default time. For valid input placeholder can be there in every input field specifying correct format to be entered
in theory it already should be "validated" by date_parse_from_format
, but it seem the result are ignored.
did you had any PHP notices?
links
https://www.php.net/manual/en/function.date-parse-from-format.php
https://www.php.net/manual/en/datetime.createfromformat.php
It is the JS ( of the calendar) that changes the date before posting the
form. php is not involved
On Sun, 6 Oct 2019 at 15:08, Fedir Zinchuk notifications@github.com wrote:
in theory it already should be "validated"
https://github.com/joomla/joomla-cms/blob/2271541/libraries/src/Form/Form.php#L1324
by date_parse_from_format, but it seem the result are ignored.
did you had any PHP notices?links
https://www.php.net/manual/en/function.date-parse-from-format.php
https://www.php.net/manual/en/datetime.createfromformat.php—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/joomla/joomla-cms/issues/26296?email_source=notifications&email_token=AA2SUPTP6QQWHSASNMSPC6LQNHPMNA5CNFSM4IWWRHHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOJV4Y#issuecomment-538745587,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA2SUPTAQJKUTUVXANQ5OZDQNHPMNANCNFSM4IWWRHHA
.
Can someone please change the label to J4 Issue as its still an issue
Labels |
Added:
No Code Attached Yet
J4 Issue
Removed: J3 Issue ? |
Done
Labels |
Added:
bug
|
This behavious seems to be the same in J4 (at least not the latest alfa). I will confirm (or debunk) this for the current alfa
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26296.