Hi Carlos I was meant to say ValidatorForm.
Cheers Ben On Tue, 7 Dec 2004 09:42:08 -0600, Carlos Cajina <[EMAIL PROTECTED]> wrote: > Good mornign Ben... > > I've settled for the quick & easy solution: there are lots of JavaScript > scripts that can handle date selection boxes :^) The thing is I don't know > much about Velocity :^( > > As for the validation, with the Validator Framework (VF) you can validate > that the dates entered/selected by the user are valid dates (i.e. dates in a > specific format [pattern]) You can also combine the VF with ValidatorForm's > validate() method to check date ranges or any other complex date validation. > > I'm not shure why you'd want to use a "date bean" in the form of a > DynaValidatorForm, maybe you could comment more on your intended solution... > > Regards, > > Carlos > > > > ----- Original Message ----- > From: "Ben" <[EMAIL PROTECTED]> > To: "Struts" <[EMAIL PROTECTED]> > Sent: Tuesday, December 07, 2004 5:17 AM > Subject: Best approach to implement date dropdown > > > 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] > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]