kajh
Aug 13th, 2007, 01:34 PM
Hi!
I have a date property for which the user in the webinterface can type in the date both with and without time of day. i.e. both
SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy");
SimpleDateFormat dateFormatVerbose = new SimpleDateFormat("dd.MM.yyyy HH:mm");
is legal date formats. Time of day is optional.
I know how to register a CustomDateEditor for one of these formats, but how can I make the binder accept dates in both formats, depending on what the user choose to use?
Any hints for where to look? :)
-Kaj :)
I have a date property for which the user in the webinterface can type in the date both with and without time of day. i.e. both
SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM.yyyy");
SimpleDateFormat dateFormatVerbose = new SimpleDateFormat("dd.MM.yyyy HH:mm");
is legal date formats. Time of day is optional.
I know how to register a CustomDateEditor for one of these formats, but how can I make the binder accept dates in both formats, depending on what the user choose to use?
Any hints for where to look? :)
-Kaj :)