{{ $currentMonthLabel }}
@foreach (['Minggu', 'Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu'] as $hari)
{{ substr($hari, 0, 2) }}
{{-- Mengambil 2 huruf depan (Mi, Se, Sl..) --}} @endforeach {{--
Su
Mo
Tu
We
Th
Fr
Sa
--}} {{-- Offset Spasi --}} @for ($i = 0; $i < $start->copy()->startOfMonth()->dayOfWeek; $i++)
@endfor {{-- Loop Tanggal --}} @php $daysInMonth = $start->copy()->daysInMonth; @endphp @for ($day = 1; $day <= $daysInMonth; $day++) @php $dateFull = $start->copy()->day($day); // Logic Disabled: Lewat hari ini ATAU lebih dari 30 hari ke depan $isPast = $dateFull->isPast() && !$dateFull->isToday(); $isTooFar = $dateFull->diffInDays(\Carbon\Carbon::now()) > 30; $isDisabled = $isPast || $isTooFar; @endphp
{{ $day }}
@endfor