You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.'
Expected result
The date field is displayed as 01-31-2023
Actual result
The date field is displayed as 31-01-2023
System information (as much as possible)
Joomla 4.2.8-dev of 12 February 2023, en-GB, on Wampserver 3.2.9 using PHP 8.1.10 in Windows 11
Additional comments
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.
The text was updated successfully, but these errors were encountered:
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
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.
Steps to reproduce the issue
Joomla 4.2.8-dev with en-GB language and the language overrides to simulate en-US:
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.'
Expected result
The date field is displayed as 01-31-2023
Actual result
The date field is displayed as 31-01-2023
System information (as much as possible)
Joomla 4.2.8-dev of 12 February 2023, en-GB, on Wampserver 3.2.9 using PHP 8.1.10 in Windows 11
Additional comments
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.
The text was updated successfully, but these errors were encountered: