Skip to content

Is it possible to use a standardized date format for “date/datetime” entries? #9813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Gindi50 opened this issue Feb 3, 2025 · 4 comments

Comments

@Gindi50
Copy link

Gindi50 commented Feb 3, 2025

For example, the entry birthday. In the upper user profile it is shown as 13 Apr. 1950, in the edit profile / profile info area it is shown as 1950-04-13, in the backend Kunena/User/User Information it is shown as 04/13/1950 and in the database it is shown as 1950-04-13.

During my search, I came across the entry “datepicker” and the format: yyyy-mm-dd in the file /components/com_kunena/template/aurelia/assets/js/main.js.
As a test, I changed the format yyyy-mm-dd to dd-mm-yyyy, but I couldn't see any changes in the spelling yet.

In doing so, I noticed the entry (“liszt:updated”); in row 28 of this file, which I changed to (“list:update”);.
I hope “liszt” was a typo.

When I change the date to 13-04-1950 in the user information in the backend, 04/13/1950 reappears in the birthday field after I save.

@rich20
Copy link
Member

rich20 commented Feb 3, 2025

In doing so, I noticed the entry (“liszt:updated”); in row 28 of this file, which I changed to (“list:update”);.
I hope “liszt” was a typo.

Typing error at "liszt:updated"

$("#kchecktarget").attr('disabled', false).trigger("liszt:updated");

@rich20 rich20 added this to the 6.3 milestone Feb 3, 2025
@Gindi50
Copy link
Author

Gindi50 commented Mar 1, 2025

I found a solution for one of these problems:
When I change the date to 13-04-1950 in the user information in the backend, 04/13/1950 reappears in the birthday field after I save.

In /administrator/components/com_kunena/tmpl/user/edit.php, I changed the entry 'm/d/Y' to 'd-m-Y' on line 187.
The date 13-04-1950 was displayed.
Then I changed the entry to 'd.m.Y' and now the date 13.04.1950 is displayed.

@sozzled
Copy link

sozzled commented Mar 1, 2025

A better solution, in my opinion, is to use en-GB instead of en-US as your language. The alternative to using ambiguous short date codes (e.g. d-m-Y) would be to use d-M-Y instead.

Copy link

github-actions bot commented Apr 1, 2025

This issue is stale because it has been open 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants