달력에 오늘 날짜표시 하는방법관련 질문입니다. 채택완료
붑후
3년 전
조회 2,090
달력에 오늘 날짜에 동그라미같은 것으로 표시를 하고자 하는데 방법을 모르겠어서 문의 드립니다.
<div class="container-fluid py-3">
<div class="row row-cols-1">
<div class="col">
<div class="bg-white border rounded">
<div class="text-center fw-bold fs-2">
{{ $baseDay->format('Y') }}년 {{ $baseDay->format('m') }}월
</div>
<div class="d-flex justify-content-between align-items-center gap-2 px-1">
<a href="{{ route('front.staff.interpretation.index', ['yearMonth' => $baseDay->copy()->subYear(1)->format('Ym')]) }}"
target="_self" class="btn btn-mint1 flex-grow-1 w-100">
<i class="fas fa-angle-double-left"></i>
<span class="visually-hidden">이전 년도</span>
</a>
<a href="{{ route('front.staff.interpretation.index', ['yearMonth' => $baseDay->copy()->subMonth(1)->format('Ym')]) }}"
target="_self" class="btn btn-mint1 flex-grow-1 w-100">
<i class="fas fa-angle-left"></i>
<span class="visually-hidden">이전 달</span>
</a>
<a href="{{ route('front.staff.interpretation.index', ['yearMonth' => date('Ym')]) }}"
target="_self" class="btn btn-mint1 flex-grow-1 w-100">
오늘
</a>
<a href="{{ route('front.staff.interpretation.index', ['yearMonth' => $baseDay->copy()->addMonth(1)->format('Ym')]) }}"
target="_self" class="btn btn-mint1 flex-grow-1 w-100">
<i class="fas fa-angle-right"></i>
<span class="visually-hidden">다음 달</span>
</a>
<a href="{{ route('front.staff.interpretation.index', ['yearMonth' => $baseDay->copy()->addYear(1)->format('Ym')]) }}"
target="_self" class="btn btn-mint1 flex-grow-1 w-100">
<i class="fas fa-angle-double-right"></i>
<span class="visually-hidden">다음 년도</span>
</a>
</div>
<div class="d-flex justify-content-between text-center py-3 calendar-header">
<strong class="sun-day">일</strong>
<strong class="day">월</strong>
<strong class="day">화</strong>
<strong class="day">수</strong>
<strong class="day">목</strong>
<strong class="day">금</strong>
<strong class="sat-day">토</strong>
</div>
@foreach($calendarPeriod as $date)
<div class="d-flex justify-content-between border-top calendar-body">
@foreach($date as $day)
<div class="text-center">
<div @if($day->format('m') !== $baseDay->format('m')) class="another-month-day"
@elseif($day->format('w') === '0') class="sun-day"
@elseif($day->format('w') === '6') class="sat-day"
@elseif($day->format('Y-m-d') === date('Y-m-d')) class="today"
@else class="day" @endif>
{{ $day->format('j') }}
</div>
@if(!empty($interpretations[$day->format('Y-m-d')]))
<a href="{{ route('front.staff.interpretation.list', ['yearMonthDay' => $day->format('Ymd')]) }}"
target="_self" class="text-decoration-none color-0 d-block px-1">
@foreach($interpretations[$day->format('Y-m-d')] as $interpretation)
@if($loop->index < 4)
<div class="bg-mint text-white text-truncate mb-1" style="font-size: 10px;">
{{ $interpretation->interpreter->name }}
-
{{ $interpretation->start_time->format('H시i분') }}
</div>
@else
<div class="badge bg-mint color-0">
+{{ count($interpretations[$day->format('Y-m-d')]) - 4 }}
<span class="visually-hidden">통역 신청 건수</span>
</div>
@break
@endif
@endforeach
</a>
@endif
</div>
@endforeach
</div>
@endforeach
</div>
</div>
</div>
</div>
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
3년 전
그누보드에 있는 소스가 아닌데 전후 잘라버리고 몸통만 내놓으면
누가 소스코드를 보고 이해를 해서 답변 가능할까요?
적어도 어느 스킨이라든지 어느 곳에서 가져다 쓰는 소스라든지 링크라도 있으면 모를까
위와 같이 해서는 답변 하기 어렵습니다
class="today" 라는 단어로 보아 저것이 오늘을 나타내는 것이라 짐작 되니 추측으로 답변을 하자면
스타일을 아래처럼 추가해 볼 수 있겠습니다
.today( background:#F80000; color:#FFF;}
로그인 후 평가할 수 있습니다
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인