[ https://issues.apache.org/jira/browse/OFBIZ-4014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026904#comment-13026904 ]
Jonas Falberg commented on OFBIZ-4014: -------------------------------------- I've been following this thread for a while now, looking for a fix to dates (in my case, Danish) and was pretty pleased when I saw this got closed as fixed. But after looking at this for a while now, this fix just doesn't work. Works fine with en-US dates, but Danish dates are wonky (de-DE, and probably others, as well). If the dates are between the 1st and 12th of the month, the datepicker thinks you mean month and as such switches the date/month around. Typing 12-4-1990 should result in April 12th, 1990 but it returns December 4th, 1990. Using 13-4-1990 results in the correct date of April 13th, 1990. It seems to also work on jQuery's website, so I tried updating jQuery to 1.5.2, and ui to 1.8.16 to see if it was a general bug but that didn't fix it. Another thing is, the jsLanguageFilesMapping.java file uses en-US as standard for da locale and da-DK only for da_DK. The parser is wrong for most two-letter locales, and I couldn't find under what circumstances this file is rewritten to fix it properly. So something is still wrong somewhere, but I'm not well-versed enough in the inner workings of ofbiz to fix it... Tested on Revision 1097719 > i18n from DateTime display fields > ---------------------------------- > > Key: OFBIZ-4014 > URL: https://issues.apache.org/jira/browse/OFBIZ-4014 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Sascha Rodekamp > Assignee: Sascha Rodekamp > Fix For: SVN trunk > > Attachments: OFBIZ-4014_ModelFormField_DateTimeField_i18n.patch, > OFBIZ-4014_ModelFormField_DateTimeField_i18n.patch, OFBIZ-4014_dateJs.zip, > OFBIZ-4014_dateJs.zip, OFBIZ-4014_dateJs.zip, > OFBIZ-4014_i18nTimepicker.patch, > OFBIZ-4014_i18nTimepicker_And_DateTimeField.patch, > OFBIZ-4014_i18nTimepicker_And_DateTimeField.patch, > OFBIZ-4014_i18nTimepicker_And_DateTimeField.patch, > OFBIZ-4014_languageFileLoading.zip, OFBIZ-4014_lazyLoadJsLanguageFiles.patch, > OFBIZ-4014_lazyLoadJsLanguageFiles.patch > > > Hi everybody, > i did a little improvement in the "display" form fields from type date and > date-time. > In the past the timestamps where read from the DB and the string was simply > cut, that didn't match with (i.e.) German date pattern. I changed this > substring stuff and used the locale and timezone with the dateFormatter to > create a i18n date string. > This patch works for: <display type="date" /> and <display type="date-time" /> > Hope that helps. > Have a nice day > Sascha -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira