Improvements to the calendar widget
This commit is contained in:
@@ -45,10 +45,6 @@ class ChronologicalCalendarWidget
|
||||
$leadingEmpty = $firstWeekday - 1;
|
||||
$totalCells = (int)ceil(($leadingEmpty + $daysInMonth) / 7) * 7;
|
||||
|
||||
$todayY = (int)date('Y');
|
||||
$todayM = (int)date('m');
|
||||
$todayD = (int)date('d');
|
||||
|
||||
$dayUrlTemplate = function_exists('wl') ? (string)wl('__LUXTOOLS_ID_RAW__') : '';
|
||||
$monthUrlTemplate = $dayUrlTemplate;
|
||||
$yearUrlTemplate = $dayUrlTemplate;
|
||||
@@ -109,11 +105,8 @@ class ChronologicalCalendarWidget
|
||||
$dayId = ChronoID::dateToDayId($date, $baseNs);
|
||||
|
||||
$classes = 'luxtools-calendar-day';
|
||||
if ($year === $todayY && $month === $todayM && $dayNumber === $todayD) {
|
||||
$classes .= ' luxtools-calendar-day-today';
|
||||
}
|
||||
|
||||
$html .= '<td class="' . hsc($classes) . '">';
|
||||
$html .= '<td class="' . hsc($classes) . '" data-luxtools-date="' . hsc($date) . '">';
|
||||
if ($dayId !== null && function_exists('html_wikilink')) {
|
||||
$html .= (string)html_wikilink($dayId, (string)$dayNumber);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user