Skip to content

Commit

Permalink
Fixed primefaces#8055 - Calendar view="month" does not highlight mont…
Browse files Browse the repository at this point in the history
…h unless manually clicked
  • Loading branch information
mertsincan committed Aug 20, 2019
1 parent 736ad0e commit fbda29a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,8 @@ export class Calendar implements OnInit,OnDestroy,ControlValueAccessor {
}

isMonthSelected(month: number): boolean {
return this.isSelected({year: this.currentYear, month: month, day: 1, selectable: true});
let day = this.value ? (Array.isArray(this.value) ? this.value[0].getDate() : this.value.getDate()) : 1;
return this.isSelected({year: this.currentYear, month: month, day: day, selectable: true});
}

isDateEquals(value, dateMeta) {
Expand Down

0 comments on commit fbda29a

Please sign in to comment.