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: modifies time #12026

Closed
Closed
@ghost

Description

Bug

Demo and steps to reproduce the issue

This blank StackBlitz demo can be used to create a reproduction that demonstrates your issue.

Demo URL (required)*:
Here is a live demo.

Detailed Reproduction Steps

  1. Notice the date strings have some time values
  2. Click or focus the datepicker
  3. Notice that the date strings have all of their time values set to midnight

Explain the expected behavior

The ng-model value must to remain the predefined time as far as possible.

However, regarding the limits (md-min-date and md-max-date), they have to be treat as read-only data, not altered.

Explain the current behavior

In the last updates, when date picker is interacted (clicked, calendar showed, focused...), time of scope values are changed. It happens both to ng-model and to limits (md-min-date and md-max-date). It is very traumatic when you are using these values to control datetime by another time input.

Discuss the use-case or motivation for changing the existing behavior

List the affected versions of AngularJS, Material, OS, and browsers

  • AngularJS: 1.7.2
  • AngularJS Material: 1.2.1
  • OS: macOS
  • Browsers: Chrome 85
  • Screen Readers:

Add anything else we should know

Stack Trace

N/A

Screenshots

Metadata

Metadata

Assignees

Labels

has: Pull RequestA PR has been created to address this issueneeds: more infoThe issue does not contain enough information for the team to determine if it is a real bugresolution: fixed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions