Skip to content

Commit

Permalink
fix: Calendar range date (#3704)
Browse files Browse the repository at this point in the history
  • Loading branch information
JKMarkowski committed Oct 29, 2020
1 parent a62260e commit ffe0841
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,10 @@ export class CalendarDayViewComponent implements OnInit, OnChanges, OnDestroy {
}

/** Verify if start day and end day is valid, otherwise don't put range selection */
if (endDay && endDay.selected && startDay && startDay.selected) {
if (dates.start && dates.end) {
/** Mark all days, which are between start and end date */
calendarList
.filter((_day) => (_day.selectedRange = CalendarService.isBetween(_day.date, dates)))
.filter((_day) => (CalendarService.isBetween(_day.date, dates)))
.forEach((_day) => (_day.selectedRange = true));
}
}
Expand Down

0 comments on commit ffe0841

Please sign in to comment.