From 07613bf1cb293e04a87bf410831792be092da14c Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Thu, 21 Nov 2024 19:15:39 -0500 Subject: [PATCH] - Small work done on calendar widget --- view/lean/widget/calendar.phtml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/view/lean/widget/calendar.phtml b/view/lean/widget/calendar.phtml index 0b46a94..376a0d8 100644 --- a/view/lean/widget/calendar.phtml +++ b/view/lean/widget/calendar.phtml @@ -31,15 +31,17 @@ {% foreach range(0, 5) as $week %}
{% foreach range(0, 6) as $day %} + {% php $dayType = in_array($day, [0, 6]) ? 'week-end' : 'week-day' %} + {% if ( $week * 6 + $day >= $index ) && ( $currentDay < $dayCount ) %} {% php $currentDay++; %} {% slot "day.content", new \DateTime("$year-$month-$currentDay"), date("$year-$month-$currentDay") === date('Y-n-j') %} -
{{ $date->format('d') }}
+
{{ $date->format('d') }}
{% endslot %} {% else %} {% slot "day.empty", $day, $month, $year %} -
+
{% endslot %} {% endif %} {% endforeach %}