medly / medly/medly-components
bug: DateRangePicker calendar does not move ahead to the month of minSelectable date
Nobody has claimed this yet.
- 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
- Add minSelectable date of 3 months from today.
- When selecting the date, calendar shows disabled dates.
- In order to select a valid date, the calendar needs to be forwarded to minSelectable month.
- 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
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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