■ユーザーズフォーラム リニューアルのお知らせ
新規投稿は新ユーザーズフォーラムにお願いします。

Re: Schedule(スケジュール)1.0.1での休日カレンダー表示について

tommy6073 > Re: Schedule(スケジュール)1.0.1での休日カレンダー表示について @ 2018/12/3 10:48
こんにちは、tommy6073です。

翌月のカレンダーを表示する $this->BcBaser->holidayCalendar() に渡す第1(年)、第2(月)引数を変えてみると上手く動くかと思います。

/app/Plugin/Schedule/View/Elements/widgets/holiday_calendar.php の先頭にて、翌月の年と月を取得する処理を書き、
$currentMonth = date('n');
$currentYear = date('Y');
if ($currentMonth === "12") {
	$nextMonth = 1;
	$nextYear = $currentYear + 1;
} else {
	$nextMonth = $currentMonth + 1;
	$nextYear = $currentYear;
}

呼び出し部分を、以下のように書き変えます。
$this->BcBaser->holidayCalendar($nextYear, $nextMonth, array('title' => true, 'class' => 'widgetScheduleCalendar', 'business_day' => '○', 'holiday' => '休'));


これでご希望の動作が実現できるのではないでしょうか。

ご参考になればと思います!
ログイン
ユーザー名:
パスワード:


  新規登録 / パスワード紛失

検索

facebook
フォーラムで悩みが解決した場合など、よかったら「いいね!」をポチっとクリックしてください!質問の回答者や開発者の励みになります

フォーラムガイド


関連リンク

オンライン状況
14 人のユーザが現在オンラインです。 (14 人のユーザが フォーラム を参照しています。)

登録ユーザ: 0
ゲスト: 14