Enhance calendar functionality: display year in month header, highlight past dates, and update date selection logic
This commit is contained in:
1 parent
6bc03be89a
commit
7fc7653e6f
6 files changed
+71
-14
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<div class="calendar">
|
||||
<h3>{{ getMonthName() }}</h3>
|
||||
<h3>{{ getMonthName() }} {{ year }}</h3>
|
||||
<div class="row header">
|
||||
<p class="day">L</p>
|
||||
<p class="day">M</p>
|
||||
@@ -16,7 +16,7 @@
|
||||
@if (day === null) {
|
||||
<p class="day empty"></p>
|
||||
} @else {
|
||||
<p [class.start]="selectedDates.isStart(day)" [class.end]="selectedDates.isEnd(day)" [class.selected]="selectedDates.isSelected(day)"
|
||||
<p [class.past]="day < getNow()" [class.start]="selectedDates.isStart(day)" [class.end]="selectedDates.isEnd(day)" [class.selected]="selectedDates.isSelected(day)"
|
||||
[class]="selectedDates.getClasses(day)" class="day number" [matTooltip]="selectedDates.getTooltip(day)" [matTooltipShowDelay]="500">{{ day.getDate() }}</p>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user