Edgewall Software

Opened 3 years ago

Last modified 3 years ago

#13352 closed defect

Date format of date set by datepicker calendar (JQuery) is in en_US format and not recognized as a date on a non en_US system — at Version 1

Reported by: carfal Owned by:
Priority: normal Milestone:
Component: i18n Version: 1.5.2
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Jun Omae)

while adding a date to a milestone the datepicker calendar shows up. If i set a date it's format is mm/dd/yy. the expected date format is different and so the milestone modify fails. Entering the date by hand in the expected format works fine. I was searching for

is an invalid date, or the date format is not known. Try

i found no ticket with the same problem. #2182 and #10245 did not help me.

I put

SetEnv LC_TIME "de_DE.UTF-8"

in the virtualhost of the trac site.conf in jquery-ui.js i changed

this.regional[ "" ] = { dateFormat: "mm/dd/yy" }  

to

this.regional[ "" ] = { dateFormat: "dd.mm.yy" }  

But it did not change anything, the date format stays the same.

i18n files for jquery are missing and i don't know where in trac to set the regional of datepicker.

$.datepicker.setDefaults($.datepicker.regional["de"]); 

If i change the language in the preferences to englisch (US), the date is recognized.

@trac:~/trac-config# locale -a
C
C.UTF-8
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
deutsch
en_US.utf8
german
POSIX

OS is Debian 11 (updated)
python3 3.9.1+
apache 2.4.46
trac set up as wsgi

I'm not sure, if trac is the problem here, but there is no way to set the regional in the datepicker and trac does not parce the mm/dd/yy date format if set to de_DE.

Change History (2)

comment:1 by Jun Omae, 3 years ago

Description: modified (diff)

by Jun Omae, 3 years ago

Attachment: datepicker-format-on-de.png added
Note: See TracTickets for help on using tickets.