Skip to content
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

@vdury

Description

@vdury

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

  1. Today is 16/07/2020, md-min-date is set as 16/05/2020, and our timezone is GMT+4.
  2. Select in "Date-picker with min date and max date" demo calendar 16/05/2020 date.
  3. Date is valid.
  4. Repeat step 2 (reselect 16/05/2020)
  5. 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.

Metadata

Metadata

Assignees

Labels

P1: urgentUrgent issues that should be addressed in the next minor or patch release.has: Pull RequestA PR has been created to address this issuei18n: localizationThis issue is related to internationalizationresolution: fixedseverity: regressionThis issue is related to a regressiontype: bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions