This repository was archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
datepicker: invalid value on first load from string #12075
Labels
has: Pull Request
A PR has been created to address this issue
P2: required
Issues that must be fixed.
resolution: fixed
severity: regression
This issue is related to a regression
type: bug
Milestone
Comments
Since a StackBlitz demo (required) was not provided, I had to do some work to get this sample code to run. Here's the StackBlitz demo. |
For now, the quick workaround is doing ctrl.myDate = new Date("2021-01-20T07:00:00Z"); instead of ctrl.myDate = "2021-01-20T07:00:00Z"; |
FYI, this also fails when the date is type moment. When |
It looks like this was caused by b406623. |
Splaktar
added a commit
that referenced
this issue
Jul 5, 2021
- when in `updateErrorState()`, need to make sure that ISO 8601 strings are parsed to dates Fixes #12075
4 tasks
Fixed in #12115 |
Splaktar
added a commit
that referenced
this issue
Jul 8, 2021
- when in `updateErrorState()`, need to make sure that ISO 8601 strings are parsed to dates Fixes #12075
Dang, this only fixed it for string. Not moment objects. |
superheri
pushed a commit
to superheri/material
that referenced
this issue
Nov 30, 2021
- when in `updateErrorState()`, need to make sure that ISO 8601 strings are parsed to dates Fixes angular#12075
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
has: Pull Request
A PR has been created to address this issue
P2: required
Issues that must be fixed.
resolution: fixed
severity: regression
This issue is related to a regression
type: bug
Bug Report
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)*:
Detailed Reproduction Steps
HTML
JS
With this code, the date IS INVALID. In version AMjs 1.2.1 work great.
Explain the expected behavior
Explain the current behavior
Discuss the use-case or motivation for changing the existing behavior
List the affected versions of AngularJS, Material, OS, and browsers
Add anything else we should know
Stack Trace
Screenshots
The text was updated successfully, but these errors were encountered: