Certainly ensuring that the to date is greater than the from date is a custom validation.
You might want to look into using a Calendar control. This can give you the best of both worlds; controlled input but still convenient for the end-user. I have had good luck with http://www.mattkruse.com/javascript/calendarpopup/.
-Bill Siggelkow
Ben wrote:
Hi
I am using Struts with Velocity as a replacement to JSP. I would like to implement a date drop down list and love to hear your opinions on the best way to implement it.
I like to have something like these on my ActionForms and use ValidatorPlugin to validate the data:
[MM] [DD] [YYYY]
Or
From [MM] [DD] [YYYY] to [MM] [DD] [YYYY]
I am planning to create two DynaValidatorForm: DateForm and TimePeriodForm. Something like these:
DateForm { Integer month; Integer day; Integer year; }
TimePeriodForm { DateForm start = new DateForm(); DateForm end = new DateForm(); }
So in my form, I can call them as timeperiod.start.month, timeperiod.start.day and timeperiod.start.year, etc...
My concern is how to validate the data and make sure the start date less than the end date.
I am looking forward to hear from you.
Thanks, Ben
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]