Skip to content

Commit

Permalink
Merge pull request #14610 from primefaces/issue-14558
Browse files Browse the repository at this point in the history
Fixed #14558 - p-calendar: Doesn't close on date selection in range mode
  • Loading branch information
cetincakiroglu authored Jan 24, 2024
2 parents 7f3b689 + a5f44f9 commit 668d895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor {
}
}

if (this.isSingleSelection() && this.hideOnDateTimeSelect) {
if ((this.isSingleSelection() && this.hideOnDateTimeSelect) || (this.isRangeSelection() && this.value[1])) {
setTimeout(() => {
event.preventDefault();
this.hideOverlay();
Expand Down Expand Up @@ -3537,4 +3537,4 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor {
exports: [Calendar, ButtonModule, SharedModule],
declarations: [Calendar]
})
export class CalendarModule {}
export class CalendarModule {}

0 comments on commit 668d895

Please sign in to comment.