It looks like because the DateConverter code uses
DateFormat.getDateInstance(DateFormat.SHORT, locale);, if you dig into this
method, it uses time style "FULL", which is documented like this: "3:30:42pm
PST". Try using that for your date. If that works, than the problem is
just that it expects a much longer version of the time.
If that's the case, just override the converter for java.util.Date (I know
you know how to do this ;) and you could put a new DateConverter, and
override this method to return whatever you want. For instance you could do
DateFormat.getDateTimeInstance(foo, bar, foo, bar)
/**
* @param locale
* @return Returns the date format.
*/
public DateFormat getDateFormat(Locale locale)
{
if (locale == null)
{
locale = Locale.getDefault();
}
return DateFormat.getDateInstance(DateFormat.SHORT, locale);
}
On Mon, Jun 2, 2008 at 4:53 PM, Michael Mehrle <[EMAIL PROTECTED]>
wrote:
> I have a text field that is backed by a java.util.Date model. When
> typing in a simple date (e.g. 4/1/2009) everything is fine. But when I
> type in a date including a time (e.g. 5/23/09 12:00 AM) I get a
> validation error:
>
>
>
> '5/23/09 12:00 AM' is not a valid Date.
>
>
>
> Obviously a date (unlike a Timestamp) should be able to accept a 'full'
> date - how do I fix this?
>
>
>
> Michael
>
>
--
Jeremy Thomerson
http://www.wickettraining.com