From 6ba73f5346345535d117e7a3fe429bf9f8aff562 Mon Sep 17 00:00:00 2001 From: Alex L Date: Wed, 5 Jul 2017 14:04:56 +0200 Subject: [PATCH] Fix for initialVisibleMonth in DayPickerRangeController #613 --- src/components/DayPickerRangeController.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/DayPickerRangeController.jsx b/src/components/DayPickerRangeController.jsx index b1417d5927..640e37ffc6 100644 --- a/src/components/DayPickerRangeController.jsx +++ b/src/components/DayPickerRangeController.jsx @@ -806,6 +806,7 @@ export default class DayPickerRangeController extends React.Component { onOutsideClick, withPortal, enableOutsideDays, + startDate, initialVisibleMonth, hideKeyboardShortcutsPanel, daySize, @@ -819,6 +820,8 @@ export default class DayPickerRangeController extends React.Component { } = this.props; const { phrases, visibleDays } = this.state; + const initialVisibleMonthThunk = + initialVisibleMonth || (startDate ? () => startDate : () => moment()); return (