Skip to content

Commit

Permalink
The min-nights modifiers should get cleared according to the previous…
Browse files Browse the repository at this point in the history
… prop value not the new one
  • Loading branch information
Maja Wichrowska committed Feb 1, 2018
1 parent 7dfe618 commit 2781b68
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/DayPickerRangeController.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,16 @@ export default class DayPickerRangeController extends React.Component {
modifiers = this.deleteModifierFromRange(
modifiers,
startSpan,
startSpan.clone().add(minimumNights, 'days'),
startSpan.clone().add(prevMinimumNights, 'days'),
'blocked-minimum-nights',
);

modifiers = this.deleteModifierFromRange(
modifiers,
startSpan,
startSpan.clone().add(prevMinimumNights, 'days'),
'blocked',
);
}

if (startDate && focusedInput === END_DATE) {
Expand Down

0 comments on commit 2781b68

Please sign in to comment.