Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Add current date as the initial visible month
Browse files Browse the repository at this point in the history
Added current date as the last resort for initialVisibleMonth in DatePickerRange.react.js (issue #115)
  • Loading branch information
xblad authored May 16, 2018
1 parent 86bc66f commit 9d0dcc7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/DatePickerRange.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ export default class DatePickerRange extends Component {
initialVisibleMonth={() => {
if (initial_visible_month) {
return initial_visible_month
} else if (end_date && focusedInput === 'endDate') {
return end_date;
} else if (start_date && focusedInput === 'startDate') {
return start_date;
} else {
if (focusedInput === 'endDate') {
return end_date;
} else {
return start_date;
}
return moment();
}
}}
isOutsideRange={this.isOutsideRange}
Expand Down

0 comments on commit 9d0dcc7

Please sign in to comment.