Skip to content

Commit

Permalink
fix: Hacker0x01#4594 fix setSelected
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki0410-dev committed Mar 16, 2024
1 parent 72ded5b commit ba670b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -697,7 +697,7 @@ export default class DatePicker extends React.Component {
if (noRanges) {
onChange([changedDate, null], event);
} else if (hasStartRange) {
if (isDateBefore(changedDate, startDate)) {
if (changedDate === null || isDateBefore(changedDate, startDate)) {
onChange([changedDate, null], event);
} else {
onChange([startDate, changedDate], event);
Expand Down

0 comments on commit ba670b2

Please sign in to comment.