[ https://issues.apache.org/jira/browse/WICKET-6576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sven Meier resolved WICKET-6576. -------------------------------- Resolution: Fixed Fix Version/s: 9.0.0 8.1.0 Regretfully Java 8 date parsing isn't lenient in regards to digit counts in dates. I've added a constructor that accepts a formatPattern and parsePattern, see DateTimePage in wicket-examples. > Support multiple dateFormats for LocalDateTextfield > --------------------------------------------------- > > Key: WICKET-6576 > URL: https://issues.apache.org/jira/browse/WICKET-6576 > Project: Wicket > Issue Type: Improvement > Components: wicket > Affects Versions: 8.0.0 > Reporter: Michael Gerhards > Assignee: Sven Meier > Priority: Minor > Fix For: 8.1.0, 9.0.0 > > Original Estimate: 8h > Remaining Estimate: 8h > > When I use the dateFormat of "dd.MM.yyyy" than an input of "1.1.2018" is > invalid. > When I use the dateFormat of "d.M.yyyy" than an input of "01.01.2018" is > valid but converted to "1.1.2018" after form submission. > When I use the dateFormat of "[d.M.yyyy][dd.MM.yyyy]" than an input of > "1.1.2018" and "01.01.2017" are both valid, but converted to > "1.1.201801.01.2018" after form submission. This is because the dateFormat is > used for both: Parse the user input as LocalDate and than transform back the > LocalDate to the representation String. > > Would it be possible to allow multiple dateFormats for input parsing and one > output dateFormat that is applied after form submission? > > I could easily write my own LocalDateTextField class but this feature should > be provided by wicket itself since I do not want to wrapp all wicket classes. -- This message was sent by Atlassian JIRA (v7.6.3#76005)