Skip to content

Commit

Permalink
fix: fix #date-picker key navigation on non range mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Jun 3, 2019
1 parent 6a142a5 commit e7c47bb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ export default class DatePickerRange extends PureComponent {
[`${type}Date`]: newDate,
_listenForPropChanges: false
}
if (!this.props.range || (nr === 0 && !this.state.endDate)) {
if (!this.props.range) {
state.endDate = newDate
} else if (this.props.range && nr === 0 && !this.state.endDate) {
state.endDate = addMonths(newDate, 1)
}

Expand Down

0 comments on commit e7c47bb

Please sign in to comment.