Date picker with maxDate displays incorrect behaviour when first opened
Bug description:
- For example, if the maxDate is the current date, the second picker displays a month from which nothing can be selected.
- The picker displays four buttons for navigating through the months instead of two.
In my case it looks like that:
Plunker/StackBlitz that reproduces the issue:
See the example on your page for min max: https://valor-software.com/ngx-bootstrap/components/datepicker#min-max
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: 18.0.0 / or in your case 20.0.0
Angular: 18.2.9
Bootstrap: "bootstrap": "5.3.3",
Expected behavior
The picker behaves correctly when you navigate back once a month and then displays the desired behaviour.
- The second picker does not open a month from which nothing can be selected.
- There are only left and right buttons to navigate through the months.
Hi, thanks for your report, I see what you mean, I'll look inside, but that's definitely not a bug, and was done intentionally. Can't explain why, but as you see arrows are disabled. Can be taken as an enhancement.
All right, we noticed that because it is not user-friendly for our customers. We would be very happy if it could be adjusted :)
@lexasq How would you deal with this behaviour? It would be good for our project to know whether you want to change anything about this behaviour and, if so, when this is planned.
Hi @MarieOlligesgeersVattenfall As the only active maintainer, I can only keep up with updates and severe bugs. If you would like to provide a PR to change this I'll be happy to test it and get into the next release. Generally this won't be prioritized in nearest future since we have more severe problems, like zoneless support, multi-modal behavior, etc.