forked from uber/baseweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(datepicker): advance calendar only if date is not isInView (uber#…
- Loading branch information
1 parent
e0f3ead
commit 6a59155
Showing
9 changed files
with
135 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/datepicker/__tests__/datepicker-range-multi-month.scenario.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
Copyright (c) 2018-2020 Uber Technologies, Inc. | ||
This source code is licensed under the MIT license found in the | ||
LICENSE file in the root directory of this source tree. | ||
*/ | ||
// @flow | ||
|
||
import * as React from 'react'; | ||
|
||
import {StyledDay, StatefulDatepicker} from '../index.js'; | ||
|
||
export const name = 'datepicker-range-multi-month'; | ||
|
||
export const component = () => ( | ||
<StatefulDatepicker | ||
aria-label="Select a date" | ||
initialState={{value: []}} | ||
range | ||
monthsShown={2} | ||
highlightedDate={new Date('March 10, 2019')} | ||
clearable={true} | ||
overrides={{ | ||
Day: { | ||
// eslint-disable-next-line react/display-name | ||
component: props => ( | ||
<StyledDay data-highlighted={props.$isHighlighted} {...props} /> | ||
), | ||
}, | ||
MonthYearSelectButton: {props: {'data-id': 'monthYearSelectButton'}}, | ||
MonthYearSelectStatefulMenu: { | ||
props: {overrides: {List: {props: {'data-id': 'monthYearSelectMenu'}}}}, | ||
}, | ||
}} | ||
/> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.81 KB
vrt/__image_snapshots__/datepicker-range-multi-month__desktop-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.07 KB
vrt/__image_snapshots__/datepicker-range-multi-month__mobile-snap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.