medly / medly/medly-components

bug: DateRangePicker calendar does not move ahead to the month of minSelectable date

Open
#727 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
80
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

When the date range provided by minSelectableDate and maxSelectableDate does not contain today's date, or next month's date in case of 2-months-view, the calendar does not move to months of that date range.

To Reproduce
  1. Add minSelectable date of 3 months from today.
  2. When selecting the date, calendar shows disabled dates.
  3. In order to select a valid date, the calendar needs to be forwarded to minSelectable month.
  4. If the minSelectable and maxSelectable are a month earlier than today's date, the error still persists.
Expected behavior

If the selectable date range starts in the previous or later month, then that month should be shown by default, when calendar selection is opened.

Screenshots

image

Package versions
  • @medly-components/core: 6.26.2
  • @medly-components/forms :
  • @medly-components/icons :
  • @medly-components/layout :
  • @medly-components/loaders :
  • @medly-components/theme :
  • @medly-components/utils :

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the DateRangePicker entry point and reproduce the issue with minSelectableDate and maxSelectableDate set to a range in a different month from today. Confirm that opening the calendar shows the selectable range's month by default, including when the range is earlier than today.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.