Skip to content

Commit

Permalink
fix: range class
Browse files Browse the repository at this point in the history
  • Loading branch information
mengxiong10 committed Dec 13, 2021
1 parent b894cf6 commit 90b221c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lib/calendar/CalendarRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,8 @@ function CalendarRange(originalProps: CalendarRangeProps) {
? props.getClasses(cellDate, currentDates, classnames)
: [];
const classes: string[] = Array.isArray(outerClasses) ? outerClasses : [outerClasses];
if (
!/disabled|active/.test(classnames) &&
currentDates.length === 2 &&
inRange(cellDate, currentDates as [Date, Date])
) {
if (/disabled|active/.test(classnames)) return classes;
if (currentDates.length === 2 && inRange(cellDate, currentDates as [Date, Date])) {
classes.push('in-range');
}
if (
Expand Down

0 comments on commit 90b221c

Please sign in to comment.