Skip to content

Commit

Permalink
Merge pull request #16299 from tindezeeuw/bugfix/issue-14233-calendar…
Browse files Browse the repository at this point in the history
…-year-selection

Fix #14233 - Component: Calendar Year picker
  • Loading branch information
cetincakiroglu authored Sep 26, 2024
2 parents 3abceb0 + 59d9d09 commit 7d7d175
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1844,13 +1844,11 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor {
}

isYearSelected(year: number) {
if (this.isComparable()) {
let value = this.isRangeSelection() ? this.value[0] : this.value;
if (!this.isComparable()) return false;
if (this.isMultipleSelection()) return false;

return !this.isMultipleSelection() ? value.getFullYear() === year : false;
}

return false;
let value = this.isRangeSelection() ? this.value[0] : this.value;
return value ? value.getFullYear() === year : false;
}

isDateEquals(value: any, dateMeta: any) {
Expand Down

0 comments on commit 7d7d175

Please sign in to comment.