Skip to content

With 2 months shown and inline calendar, the months shift when range selected spans the 2 months #1337

Closed
@sshilal1

Description

@sshilal1

I have an inline calendar with 2 months shown. Whenever a user selects a date range that spans the 2 months, if the range is not in the same month, the left month slides out of view. As seen in the gif below, In order to view the full range, a user must select the back arrow to see the range again.

datepicker1

Here is my code

<DatePicker
  inline
  selected={this.state.startDate}
  startDate={this.state.startDate}
  endDate={this.state.endDate}
  onChange={this.handleDateSelect}
  monthsShown={2}
  shouldCloseOnSelect={false}
/>

I feel as if there should be a prop to enable / disable this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions