[ https://issues.apache.org/jira/browse/WICKET-688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eelco Hillenius resolved WICKET-688. ------------------------------------ Resolution: Fixed Fix Version/s: 1.3.0-beta2 > DatePicker doesn't work with TextField > -------------------------------------- > > Key: WICKET-688 > URL: https://issues.apache.org/jira/browse/WICKET-688 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.3.0-beta1 > Reporter: Kent Tong > Assignee: Eelco Hillenius > Fix For: 1.3.0-beta2 > > > DatePicker doesn't work with a TextField even though whose type has been set > to java.util.Date. This is because when it tries to get a converter for > DateTime.class, a DefaultConverter is returned instead of null. So it won't > try to get a converter for Date.class: > protected void checkComponentProvidesDateFormat(Component component) > { > if (component instanceof ITextFormatProvider) > { > // were ok > return; > } > IConverter converter = component.getConverter(DateTime.class); > if (converter == null) > { > converter = component.getConverter(Date.class); > } > if (converter instanceof DateConverter) > { > return; // This is ok > } > throw new WicketRuntimeException( > "this behavior can only be added to components > that either implement " > + > ITextFormatProvider.class.getName() + " or that use " > + DateConverter.class.getName() > + " configured with an instance of " > + > SimpleDateFormat.class.getName() > + " (like Wicket's default > configuration has)"); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.