angular icon indicating copy to clipboard operation
angular copied to clipboard

Day remains selected when switching month even when out of min, max range

Open conor-mac-aoidh opened this issue 3 years ago • 1 comments

Describe the bug

When a day is selected in the datetime picker and a min date is specified, an invalid date can easily be selected by switching months & pressing the apply button.

Minimal Reproduction

  1. Create a datetime picker with today as the selected date (eg. 22-11-2021)
  2. Set the minimum date to today + 1 day - 1 month (eg. 23-10-2021)
  3. Open the date picker & navigate to the previous month
  4. A date before the min date is selected (eg. 22-10-2021)

Expected behavior

A date before the minimum date should not be selectable.

Screenshots

image

conor-mac-aoidh avatar Nov 22 '21 14:11 conor-mac-aoidh

@conor-mac-aoidh I'm testing this and I see the expected behavior.

Maybe there's a confusion for you because the datepicker marks one date as active but it's not selected because the component didn't output any value, you cannot click on it. You're able to click 23 in your screenshot but 22 cannot be selected, it's just active for keyboard actions.

matheo avatar Nov 30 '21 01:11 matheo