calendar done needs to do heuristic

This commit is contained in:
nessar committed 2025-10-26 03:53:45 +01:00
1 parent 6ed0bdeca7
commit 9ccbe2534a
22 files changed
+16146 -15540

No files matched your search

@@ -0,0 +1,36 @@
import { Component, Input, OnInit } from '@angular/core';
import { CalendarService, Month, monthNames, SelectedDates } from '../../services/calendar-service';
import { MatTooltip } from '@angular/material/tooltip';
@Component({
selector: 'app-calendar-month',
imports: [MatTooltip],
templateUrl: './calendar-month.html',
styleUrl: './calendar-month.scss',
})
export class CalendarMonth implements OnInit {
@Input({ required: true })
monthIndex!: number;
@Input({ required: true })
year!: number;
currentMonth: Date = new Date();
weeksInAMonth: Month = [];
@Input({ required: true })
selectedDates!: SelectedDates;
getMonthName(): string {
return monthNames[this.monthIndex];
}
constructor(private calendarService: CalendarService) { }
ngOnInit(): void {
this.weeksInAMonth = this.calendarService.weeksInMonth(this.monthIndex, this.year);
}
}