Skip to content

Commit

Permalink
Allows selecting the end date first for unattached vertically oriente…
Browse files Browse the repository at this point in the history
…d datepickers
  • Loading branch information
Maja Wichrowska committed Oct 13, 2016
1 parent bc06856 commit 71f9c88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/DateRangePicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,10 @@ export default class DateRangePicker extends React.Component {
}

onEndDateFocus() {
const { startDate, onFocusChange, orientation, disabled } = this.props;
const { startDate, onFocusChange, withFullScreenPortal, disabled } = this.props;

if (!startDate && orientation === VERTICAL_ORIENTATION && !disabled) {
// Since the vertical datepicker is full screen, we never want to focus the end date first
if (!startDate && withFullScreenPortal && !disabled) {
// When the datepicker is full screen, we never want to focus the end date first
// because there's no indication that that is the case once the datepicker is open and it
// might confuse the user
onFocusChange(START_DATE);
Expand Down

0 comments on commit 71f9c88

Please # to comment.