Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rich Faces calendar Date range

 
nitin pokhriyal
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am facing issue in JSf. I want user to select only dates in the specified range. Say between "1/1/2009" to "1/21/2009" other than that all shd not be selectable. I tried many things it is not working. I am using RichFaces components. If anybody has any idea help me out. Thanks in advance

 
Tom Fulton
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I quickly looked at the RichFaces documentation (which is entertaining all by itself) and didn't see a direct way to accomplish what you want to do. If I understand your requirement correctly, you want to limit the available dates to a certain range in the control itself. It does have two attributes you can specify: preloadDateRangeBegin and preloadDateRangeEnd, which would theoretically do what you want. But the documentation (for want of a better word) doesn't say that it actually limits the user's choice, only that it limits the initial range to the specified dates...the implication being that the user can scroll beyond those dates if needed.

You can try to use these attributes, and then add a validator to the control which will determine whether the submitted value is within the range you want.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic