@@ -157,6 +157,54 @@ function renderNavNextButton(buttonProps) {
157157 ) ;
158158}
159159
160+ function renderNavPrevButtonForVerticalScrollable ( buttonProps ) {
161+ const {
162+ ariaLabel,
163+ disabled,
164+ onClick,
165+ onKeyUp,
166+ onMouseUp,
167+ } = buttonProps ;
168+
169+ return (
170+ < button
171+ aria-label = { ariaLabel }
172+ disabled = { disabled }
173+ onClick = { onClick }
174+ onKeyUp = { onKeyUp }
175+ onMouseUp = { onMouseUp }
176+ style = { { width : '100%' , textAlign : 'center' } }
177+ type = "button"
178+ >
179+ ‹ Prev
180+ </ button >
181+ ) ;
182+ }
183+
184+ function renderNavNextButtonForVerticalScrollable ( buttonProps ) {
185+ const {
186+ ariaLabel,
187+ disabled,
188+ onClick,
189+ onKeyUp,
190+ onMouseUp,
191+ } = buttonProps ;
192+
193+ return (
194+ < button
195+ aria-label = { ariaLabel }
196+ disabled = { disabled }
197+ onClick = { onClick }
198+ onKeyUp = { onKeyUp }
199+ onMouseUp = { onMouseUp }
200+ style = { { width : '100%' , textAlign : 'center' } }
201+ type = "button"
202+ >
203+ Next ›
204+ </ button >
205+ ) ;
206+ }
207+
160208function renderKeyboardShortcutsButton ( buttonProps ) {
161209 const { ref, onClick, ariaLabel } = buttonProps ;
162210
@@ -462,6 +510,20 @@ storiesOf('DayPickerRangeController', module)
462510 />
463511 </ div >
464512 ) ) )
513+ . add ( 'vertical scrollable with custom rendered month navigation' , withInfo ( ) ( ( ) => (
514+ < div style = { { height : 500 } } >
515+ < DayPickerRangeControllerWrapper
516+ onOutsideClick = { action ( 'DayPickerRangeController::onOutsideClick' ) }
517+ onPrevMonthClick = { action ( 'DayPickerRangeController::onPrevMonthClick' ) }
518+ onNextMonthClick = { action ( 'DayPickerRangeController::onNextMonthClick' ) }
519+ orientation = { VERTICAL_SCROLLABLE }
520+ numberOfMonths = { 3 }
521+ verticalHeight = { 300 }
522+ renderNavPrevButton = { renderNavPrevButtonForVerticalScrollable }
523+ renderNavNextButton = { renderNavNextButtonForVerticalScrollable }
524+ />
525+ </ div >
526+ ) ) )
465527 . add ( 'with custom month navigation icons' , withInfo ( ) ( ( ) => (
466528 < DayPickerRangeControllerWrapper
467529 onOutsideClick = { action ( 'DayPickerRangeController::onOutsideClick' ) }
0 commit comments