This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
datepicker: min-date validation bug #11963
Description
Bug
In angular material 1.1.24, the datepicker directive sometimes invalidates a date if md-min-date is equal to selected date.
Demo and steps to reproduce the issue
Demo URL : https://material.angularjs.org/1.1.24/demo/datepicker#validations (Validations)
Detailed Reproduction Steps
- Today is 16/07/2020, md-min-date is set as 16/05/2020, and our timezone is GMT+4.
- Select in "Date-picker with min date and max date" demo calendar 16/05/2020 date.
- Date is valid.
- Repeat step 2 (reselect 16/05/2020)
- Date is invalid.
Explain the expected behavior
md-min-date is supposed to be inclusive, so we expect 16/05/2020 to be always valid on 16/07/2020.
List the affected versions of AngularJS, Material, OS, and browsers
- AngularJS: 1.8.0
- AngularJS Material: 1.1.24
- OS: Windows
- Browsers: Chrome
Add anything else we should know
We suspect method DateUtil.removeLocalTzAndReparseDate (introduced in commit) to be at the origin of the problem.