Skip to content

Commit d991082

Browse files
authored
Fix to return false if date is outside of range
1 parent ea5fd4f commit d991082

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/day.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,10 @@ export default class Day extends React.Component {
132132
if (
133133
this.props.disabledKeyboardNavigation &&
134134
!this.props.selectingDate &&
135-
!isEqual(this.props.selected, this.props.preSelection)
135+
((selectsStart &&
136+
(!startDate || isBefore(selectingDate, startDate))) ||
137+
(selectsEnd &&
138+
(!endDate || isAfter(selectingDate, endDate))))
136139
) {
137140
return false;
138141
}

0 commit comments

Comments
 (0)