Community
Participate
Working Groups
Build Identifier: 3.7.0.2011-Jun 2011 PROBLEM DESCRIPTION: An ordinary date field is able to parse "short" input string, i.e. 15122010 --> 15.12.2010 or 010111 --> 01.01.2011. A date field with time should allow this form too, especially because the GUI uses separate date and time entry fields. However, it does not, the value is rejected. There is a related problem with the DateTimeField when a "delta string" is entered as a date, e.g. "+7" (= today + 7 days). A date field without time can parse this, a field with time can not. EVALUATION: The method AbstractDateField.parseDateTimeFormatsInternal(String, BooleanHolder) does not work correctly. The "text" parameter contains both the date and the time, and the parser cannot handle this case correctly when the date is entered in short form. (Input string then looks something like "15122010 00:00".) PROPOSED SOLUTION: See attached patch (fixes both problems), but maybe there is a better solution. Reproducible: Always Steps to Reproduce: See problem description.
Created attachment 198623 [details] Patch
Fixed in AbstractDate model class using a thread local parse context to parse splitted date/time parts.
shipped with scout 3.7.1
Comment on attachment 198623 [details] Patch patch was not used by ivan motsch