Description
Bug
Improper behavior when the max date selected is earlier than the min date selected.
What is the expected behavior?
If the min date is later than the max date, then after selecting the improper max date, the max date should automatically change to the min date value and everything in the calendar should be disabled in the result.
What is the current behavior?
If the min date is later than the max date, then after selecting improper max date, the max date doesn't automatically change to the min date and the calendar header component isn't disabled, allowing the user to scroll next and previous arrow keys to other months, even though all of the dates are disabled in the result.
https://user-images.githubusercontent.com/15025941/40395029-f90babd2-5dda-11e8-974a-373007197722.png.
What are the steps to reproduce?
- Run
gulp serve:devapp
and go to the Datepicker component. - Choose a min date and then choose a max date that is earlier than the min date.
- Open the result, and note the calendar arrows that aren't disabled and the max date doesn't change to the min date.
What is the use-case or motivation for changing an existing behavior?
Changing existing behavior so that min date will always be earlier than max date for efficient user usability.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Material 2.