This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Date Validator scrolls the date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Date Validator scrolls the date" Watch "Date Validator scrolls the date" New topic
Author

Date Validator scrolls the date

Kinjal Sonpal
Ranch Hand

Joined: Jun 06, 2003
Posts: 96
Hi all,

I'm using Struts Validator for validating date input. When the user enters the date something like 15/15/2004, for expected format MM/dd/yyyy, the date is interpreted as 03/15/2005.

My validation looks like thisI think this happens because of SimpleDateFormat. Has anyone found workarounds for this? One solution that I've thought of, as a last resort, is providing a client side date picker and making the field read-only. But I'd really like to have a solid server-side solution than relying on client-side scripting

Please share your views on this.

Thanks and regards,
Kinjal Sonpal
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date Validator scrolls the date