Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jan 24, 2024
1 parent 03ab022 commit a5f44f9
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/app/components/calendar/calendar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1483,22 +1483,10 @@ export class Calendar implements OnInit, OnDestroy, ControlValueAccessor {
} else {
if (this.shouldSelectDate(dateMeta)) {
this.selectDate(dateMeta);
this.value[1] &&
this.hideOnDateTimeSelect &&
setTimeout(() => {
event.preventDefault();
this.hideOverlay();

if (this.mask) {
this.disableModality();
}

this.cd.markForCheck();
}, 150);
}
}

if (this.isSingleSelection() && this.hideOnDateTimeSelect) {
if ((this.isSingleSelection() && this.hideOnDateTimeSelect) || (this.isRangeSelection() && this.value[1])) {
setTimeout(() => {
event.preventDefault();
this.hideOverlay();
Expand Down Expand Up @@ -3549,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 a5f44f9

Please sign in to comment.