Skip to content

Commit

Permalink
Merge pull request #52 from alistairjcbrown/new-range-not-updating
Browse files Browse the repository at this point in the history
Compare new and old range using isSame
  • Loading branch information
AndrewIngram committed Jul 30, 2015
2 parents 105c303 + f66a5b8 commit 228a4fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DateRangePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const DateRangePicker = React.createClass({

this.setState({
dateStates: this.state.dateStates && Immutable.is(this.state.dateStates, nextDateStates) ? this.state.dateStates : nextDateStates,
enabledRange: this.state.enabledRange && Immutable.is(this.state.enabledRange, nextEnabledRange) ? this.state.enabledRange : nextEnabledRange,
enabledRange: this.state.enabledRange && this.state.enabledRange.isSame(nextEnabledRange) ? this.state.enabledRange : nextEnabledRange,
});
},

Expand Down

0 comments on commit 228a4fd

Please sign in to comment.