We are trying to use the DatePicker, only allowing the selection of days
5-25 of each month.

We've tried adding the following renderer to work with the OutOfBoundsDate,
but it doesn't work when the calendar is initially shown.  For example, if
the pageDate of the calendar is set to 03/2009, the 1st through the 4th of
April and May will be disabled as expected, but the 1st through the 4th of
March will be enabled.  When navigating back to March, the 1st through the
4th are then disabled, as expected!  Also, closing the calendar and
reopening it disables the 1st through the 4th, which is what we want... but
we want it to start out with those dates disabled.

for ( int i = minCal.get(Calendar.*MONTH*); i <= maxCal.get(Calendar.MONTH);
i++){
 javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/1\",
${calendar}.renderOutOfBoundsDate);";
 javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/2\",
${calendar}.renderOutOfBoundsDate);";
 javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/3\",
${calendar}.renderOutOfBoundsDate);";
 javascript += "${calendar}.addRenderer(\"" + (i + 1) + "/4\",
${calendar}.renderOutOfBoundsDate);";
 ....


We also thought we might do something special on the 'init' method, and we
noticed an old 'appendToInit' method, but it's deprecated.

Thanks for any ideas.
Trent

Reply via email to