I figured out how this works, so here it is:
I created a class that implements CalendarDataModel .
I did not use the preloadDateRangeStart and preloadDateRangeEnd , though, since CalendarDataModel only cares about the range between preloadDateRangeStart and preloadDateRangeEnd if you specify them.
My CalendarDataModel disables calendar items whose date is outside the date range that I specified in the properties file, and which I use in CalendarDateModel to determine if there is an item date between the range to disable it.
So now it works great. Here is the tag:
<a4j:outputPanel id="myCal" layout="block"> <rich:calendar cellHeight="30px" cellWidth="30px" dataModel="#{MyCalendarDataModel}" datePattern="dd/MM/yyyy" mode="ajax" style="width:200px" value="#{MyPage.theDate}"/> </a4j:outputPanel>
I also tried your solution. It works, but it is a bit messy on the client.
Thanks again to the man
DaTroop
source share