You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bill Schneider <bs...@vecna.com> on 2003/02/28 15:57:41 UTC
best practice: date widget
What is the best-practice with Struts for making something like an HTML
date-widget control, that has three different input fields but maps to a
java.util.Date in a form bean? The idea is I want to be able to put
something like
<html:date property="startDate"/>
in a JSP page, and call "Date d = formBean.getStartDate()" from a Java
action. The output HTML should look like
<select name="startDate.month">
<option value="1">January</option>
...
</select>
<input type="text" name="startDate.day">
<input type="text" name="startDate.year">
and there should be a way to validate to make sure this is a valid date
(February 31 not allowed.)
Any ideas would be appreciated. Thanks!
-- Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org