File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes Date Validation 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 » Java » JSF
Bookmark "Date Validation" Watch "Date Validation" New topic
Author

Date Validation

Vidu Greg
Greenhorn

Joined: Sep 05, 2005
Posts: 10
Hi

I am having a problem in this. I dont want a user to pick a previous date so I am having minimum "now".

<h:inputText value="#{myBean.effectiveDate}" id="effectiveDate">
<f:convertDateTime type="date" pattern="MM/dd/yyyy"/><hx:inputHelperDatePicker />
<hx:validateDateTimeRange minimum="#{now}" />
</h:inputText>

but the problem is when user enters today's date, it validate time also and then gives validation error because by default the time is 12 PM and if user is trying after 12 PM, it will give validation error. I am using a pattern also but still having problem.

thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61456
    
  67

"vd grg",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
Don't get me started about those stupid light bulbs.
 
subject: Date Validation