Joomla 4.2.8-dev with en-GB language and the language overrides to simulate en-US:
DATE_FORMAT_LC4="m-d-Y"
DATE_FORMAT_FILTER_DATETIME="m-d-Y H:i:s"
DATE_FORMAT_CALENDAR_DATE="%m-%d-%Y"
DATE_FORMAT_FILTER_DATE="m-d-Y"
DATE_FORMAT_CALENDAR_DATETIME="%m-%d-%Y %H:%M:%S"
Enable the option Allow User Registration.
Create a user custom field of type Calendar, 'Date Of Birth'.
Go to the front end and select the option 'Create an account' from the login module.
Fill in the registration form but use an existing username.
Fill in the Date Of Birth from the Calendar button, for example 01-31-2023.
Click the Register button to submit the form.
The form is displayed with the error 'The username you entered is not available. Please pick another username.'
The date field is displayed as 01-31-2023
The date field is displayed as 31-01-2023
Joomla 4.2.8-dev of 12 February 2023, en-GB, on Wampserver 3.2.9 using PHP 8.1.10 in Windows 11
Reported first and discussed in the Joomla forum at https://forum.joomla.org/viewtopic.php?f=808&t=999269
When a new user is created at the back end using an existing username and the error message "Save failed with the following error: Username in use" is received, the custom date is displayed correctly.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Thank you for looking into this. The forum member who reported the issue reported this error which I was unable to reproduce with my en-GB language with US overrides:
0 DateTime::__construct(): Failed to parse time string (02-24-2023) at position 0
(0): Unexpected character
Ref. https://forum.joomla.org/viewtopic.php?f=808&t=999269#p3684329
I did not make language override but installed US language package to test it, but it should work in the same way. Seems PHP DateTime class could not parse a date in US format for some reasons.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-02-15 11:24:38 |
Closed_By | ⇒ | joomdonation |
Just looked at this and for my test, I even see fatal error. Could anyone else confirms that?