File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -806,6 +806,7 @@ export default class DayPickerRangeController extends React.Component {
806806 onOutsideClick,
807807 withPortal,
808808 enableOutsideDays,
809+ startDate,
809810 initialVisibleMonth,
810811 hideKeyboardShortcutsPanel,
811812 daySize,
@@ -819,6 +820,8 @@ export default class DayPickerRangeController extends React.Component {
819820 } = this . props ;
820821
821822 const { phrases, visibleDays } = this . state ;
823+ const initialVisibleMonthThunk =
824+ initialVisibleMonth || ( startDate ? ( ) => startDate : ( ) => moment ( ) ) ;
822825
823826 return (
824827 < DayPicker
@@ -837,7 +840,7 @@ export default class DayPickerRangeController extends React.Component {
837840 renderMonth = { renderMonth }
838841 withPortal = { withPortal }
839842 hidden = { ! focusedInput }
840- initialVisibleMonth = { initialVisibleMonth }
843+ initialVisibleMonth = { initialVisibleMonthThunk }
841844 daySize = { daySize }
842845 onOutsideClick = { onOutsideClick }
843846 navPrev = { navPrev }
You can’t perform that action at this time.
0 commit comments