Skip to content

Commit d49255b

Browse files
authored
Merge pull request SimpleMachines#9071 from jdarwood007/calendarFix
Fix undefined variables needed in our template
2 parents 1395355 + 3660356 commit d49255b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/Subs-Calendar.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,9 @@ function getCalendarGrid($selected_date, $calendarOptions, $is_previous = false,
426426
'disabled' => $modSettings['cal_maxyear'] < date_format($next_object, 'Y'),
427427
),
428428
'start_date' => timeformat(date_format($selected_object, 'U'), get_date_or_time_format('date')),
429+
'start_year' => date_format($selected_object, 'Y'),
430+
'start_month' => date_format($selected_object, 'm'),
431+
'start_day' => date_format($selected_object, 'd'),
429432
);
430433

431434
// Get today's date.
@@ -594,6 +597,9 @@ function getCalendarWeek($selected_date, $calendarOptions)
594597
'disabled' => $modSettings['cal_maxyear'] < date_format($next_object, 'Y'),
595598
),
596599
'start_date' => timeformat(date_format($selected_object, 'U'), get_date_or_time_format('date')),
600+
'start_year' => date_format($selected_object, 'Y'),
601+
'start_month' => date_format($selected_object, 'm'),
602+
'start_day' => date_format($selected_object, 'd'),
597603
'show_events' => $calendarOptions['show_events'],
598604
'show_holidays' => $calendarOptions['show_holidays'],
599605
'show_birthdays' => $calendarOptions['show_birthdays'],

0 commit comments

Comments
 (0)