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
posted 7 years ago
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.