You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul Barry <pa...@nyu.edu> on 2004/04/09 20:59:45 UTC
html:text for Date property
What is the best way to deal with a Date property in an ActionForm? My
ActionForm has a object that has a Date property that I want to set.
So I have
<html:text property="object.date">
If I populate the that property in the Action like this:
MyObject obj = new MyObject();
obj.setDate(new Date());
form.setObject(obj);
The html:text tag does a toString() on the object.date property. How
can I get it to display in the MM/DD/YYYY format instead? Likewise, how
do I make it so the user can enter a date in the format of MM/DD/YYYY
and have it correctly set the Date property?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org