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 DatePickerSingle.react.js (issue #115)
  • Loading branch information
xblad authored May 16, 2018
1 parent 9d0dcc7 commit c415a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/DatePickerSingle.react.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default class DatePickerSingle extends Component {
onDateChange={this.onDateChange}
focused={focused}
onFocusChange={({focused}) => this.setState({focused})}
initialVisibleMonth={() => date || initial_visible_month}
initialVisibleMonth={() => date || initial_visible_month || moment()}
isOutsideRange={this.isOutsideRange}
numberOfMonths={number_of_months_shown}
withPortal={with_portal && verticalFlag}
Expand Down

0 comments on commit c415a1b

Please sign in to comment.