-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
p-calendar months not disabled in month selection mode #11339
Comments
We are experiencing the same situation in our website. No more able to disable some specific months in "month" view mode. Please consider to make available again this feature. |
Same issue here, version |
Hi, So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Best Regards, |
Thank you for the response. We ended up going with another control because this was a blocking issue for us. I did however take a look at the latest source (https://github.com/primefaces/primeng/blob/master/src/app/components/calendar/calendar.ts) and it does appear like this issue was taken care of but I have not tested/verified. I can now see that the following lines have been added in the template when looping through monthPickerValues: Thanks again. |
If you have a PrimeNG PRO Support subscription please post your issue at;
https://pro.primefaces.org
where our team will respond within 4 business hours.
If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that
your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.
Current Queue Time for Review
Without PRO Support: ~8-12 weeks.
With PRO Support: 1 hour
I'm submitting a ... (check one with "x")
Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
https://stackblitz.com/github/primefaces/primeng-issue-template
Current behavior
p-calendar no longer disables months in month selector when view attribute is set to month after version 13.1.0 related to
commit: bbd97fd
issue: #11027
While I understand the reason for the change when p-calendar is in normal date selection mode (view=date), we feel like the recent change causes a bug when date selection mode is month. We have a business case in which we only select a month using p-calendar and also use min/max as well as disabled dates. We may have some months between min/max that have no underlying data and do not allow the user to select those months.
Expected behavior
Continue to disable months in the month selector when view mode is set to month supporting min/max dates as well as disabled dates. Please see attached picture of how the month selection appears in version 13.0.4 and prior. Here is an example where we have min date of Jun 2018, max date of Sep 2018 along with Jul/Aug 2018 (between min/max) disabled because we have no underlying data for those months.
Minimal reproduction of the problem with instructions
p-calendar with
view=month
minDate=set to a minimum date
maxDate=set to a maximum date
disabledDates=set to one or more dates in between min/max date
What is the motivation / use case for changing the behavior?
to restore previous behavior prior to bbd97fd. As noted above, the previous behavior was expected behavior for our business needs when view=month.
Please tell us about your environment:
Windows, VS Code, npm, IIS, node
Angular 13.2.6
13.2.0
latest Chrome & Edge
Language: [all | TypeScript X.X | ES6/7 | ES5]
TypeScript ~4.5.5
Node (for AoT issues):
node --version
=node=16.13.2
npm=8.4.1
The text was updated successfully, but these errors were encountered: