ngx-bootstrap icon indicating copy to clipboard operation
ngx-bootstrap copied to clipboard

Date picker with maxDate displays incorrect behaviour when first opened

Open MarieOlligesgeersVattenfall opened this issue 4 months ago • 4 comments

Bug description:

  1. For example, if the maxDate is the current date, the second picker displays a month from which nothing can be selected.
  2. The picker displays four buttons for navigating through the months instead of two.
Image

In my case it looks like that: Image

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

Image

The picker behaves correctly when you navigate back once a month and then displays the desired behaviour.

Image
  1. The second picker does not open a month from which nothing can be selected.
  2. 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.

lexasq avatar Aug 20 '25 12:08 lexasq

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.

lexasq avatar Sep 01 '25 09:09 lexasq