aspose file tools
The moose likes JSF and the fly likes Date Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply 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: 56233
    
  13

"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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date Validation
 
Similar Threads
f:convertDateTime issue
replacing default validator message at h:messages
validate convertDateTime
Refresh values of JSF page before validation occurs
How to show a single error message for all fields