- Small work done on calendar widget
This commit is contained in:
		
							parent
							
								
									163df3f4ba
								
							
						
					
					
						commit
						07613bf1cb
					
				| @ -31,15 +31,17 @@ | ||||
|     {% foreach range(0, 5) as $week  %} | ||||
|         <div class="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') %} | ||||
|                         <div class="day-box {{ $today ? 'today' : '' }}">{{ $date->format('d') }}</div> | ||||
|                         <div class="day-box {{ $today ? 'today' : '' }} {{ $dayType }}">{{ $date->format('d') }}</div> | ||||
|                     {% endslot %} | ||||
|                {% else %} | ||||
|                     {% slot "day.empty", $day, $month, $year %} | ||||
|                         <div class="day-box"></div> | ||||
|                         <div class="day-box {{ $dayType }}"></div> | ||||
|                     {% endslot %} | ||||
|                 {% endif %} | ||||
|             {% endforeach %} | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user