Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar: shows future and/or past dates even when minDate and/or maxDate props are set #1661

Closed
hstevanoski opened this issue Nov 3, 2020 · 8 comments · Fixed by #2556 or #2771
Closed
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@hstevanoski
Copy link

I'm submitting a ...

[x] bug report
[ ] feature request
[ ] support reques

Codesandbox Case
https://primefaces.org/primereact/showcase/#/calendar

Current behavior
The Calendar component shows past and future dates even when minDate and maxDate are set.
Case in point: the "MinMax" example in the documentation. You can go past minDate and maxDate.

Expected behavior
Although disabled, dates set before minDate and after maxDate (whichever is present, if any) should not be shown.

  • React version:
    16.3.1

  • PrimeReact version:
    15.0.1

@mcandu mcandu added the Status: Discussion Issue or pull request needs to be discussed by Core Team label Aug 19, 2021
@fenes
Copy link

fenes commented Dec 26, 2021

Any progress on this issue?

@melloware
Copy link
Member

@fenes I can have a look at this issue this week and hopefully submit a PR.

@melloware
Copy link
Member

I submitted a PR. #2556

melloware added a commit to melloware/primereact that referenced this issue Jan 3, 2022
melloware added a commit to melloware/primereact that referenced this issue Jan 4, 2022
@stewartiee
Copy link

@melloware Any updates on when this may be merged? I have stumbled across this issue today.

@melloware
Copy link
Member

that's up to @mertsincan and PrimeTek!

@mertsincan mertsincan added Type: Bug Issue contains a defect related to a specific component. and removed Status: Discussion Issue or pull request needs to be discussed by Core Team labels Apr 15, 2022
@mertsincan mertsincan added this to the 8.0.0-rc.2 milestone Apr 15, 2022
mertsincan added a commit that referenced this issue Apr 15, 2022
mertsincan added a commit that referenced this issue Apr 15, 2022
mertsincan added a commit that referenced this issue Apr 15, 2022
@mertsincan mertsincan removed this from the 8.0.0-rc.2 milestone Apr 15, 2022
@mertsincan mertsincan reopened this Apr 15, 2022
@mertsincan
Copy link
Member

@melloware will add a new prop for this feature.

@mertsincan mertsincan added Type: New Feature Issue contains a new feature or new component request Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add and removed Type: Bug Issue contains a defect related to a specific component. Type: New Feature Issue contains a new feature or new component request labels Apr 15, 2022
melloware added a commit to melloware/primereact that referenced this issue Apr 19, 2022
@melloware
Copy link
Member

@mertsincan this actually is much easier now that you switched to hooks because I can put this code in one place when the overlay panel renders and update the navigators appropriately without and additional property.

@melloware melloware added this to the 8.0.0-rc.3 milestone Apr 19, 2022
@mertsincan mertsincan modified the milestones: 8.0.0.Final, 8.1.0 Apr 20, 2022
@melloware melloware changed the title Calendar component shows future and/or past dates even when minDate and/or maxDate props are set Calendar: shows future and/or past dates even when minDate and/or maxDate props are set Apr 26, 2022
melloware added a commit to melloware/primereact that referenced this issue May 9, 2022
@melloware
Copy link
Member

I picked showOutliers as the property as I could not think of a better name for what we are allowing to be displayed.

melloware added a commit to melloware/primereact that referenced this issue Jul 1, 2022
melloware added a commit to melloware/primereact that referenced this issue Jul 1, 2022
melloware added a commit that referenced this issue Jul 1, 2022
* Fix #1661: Calendar do not navigate past min and max

* Fix #1661: Calendar do not navigate past min and max

* Fix #1661: Calendar do not navigate past min and max
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
6 participants