2

2 つの ric:calendar を使用しています。1 つは開始日用、もう 1 つは終了日用です。

終了日は、開始日の選択に基づいて、以前のすべての日付を自動的に無効にする必要があります。

dayDisableClass を使用することは可能ですか?

4

2 に答える 2

2

方法についてはdisabledDay...

この投稿を見てください: rich:Calendar で日を無効にする

また、カレンダーを使用することもできますCalendarDataModel-> CalendarDataModelItem->isEnabled()

Boolean isEnabled() returns "true" if date is "selectable" on the calendar, the default implementation returns "true"

デモを見てください

于 2012-10-31T08:15:45.847 に答える
0

カレンダーの属性dayDisableFunctionを使用して、無効にする日を定義する JavaScript 関数を定義できます。

<rich:calendar dayDisableFunction="disablementFunction" ...</rich:calendar>

JS 関数の例:

function disablementFunction(day) {
    if (day.isWeekend) return false;
    return true;
}
于 2012-11-08T14:09:48.650 に答える