-
Notifications
You must be signed in to change notification settings - Fork 6.8k
bug(datepicker): does not change selected year when using the left/right arrows with the Year and Month picker #24230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Related to #23483. |
I can reproduce this. |
zarend
added a commit
to zarend/components
that referenced
this issue
Mar 21, 2022
Fix issue angular#24230 in the Datepicker Views Selection code demo. When selecting a month, set the year on the form value to the active year on the datepicker. Previously, this demo would only set the year when clicking on a year in the datepicker, but this did not account for changing the year with the next/previous year buttons. Fixes angular#24230
andrewseguin
pushed a commit
that referenced
this issue
Mar 24, 2022
Fix issue #24230 in the Datepicker Views Selection code demo. When selecting a month, set the year on the form value to the active year on the datepicker. Previously, this demo would only set the year when clicking on a year in the datepicker, but this did not account for changing the year with the next/previous year buttons. Fixes #24230
andrewseguin
pushed a commit
that referenced
this issue
Mar 24, 2022
Fix issue #24230 in the Datepicker Views Selection code demo. When selecting a month, set the year on the form value to the active year on the datepicker. Previously, this demo would only set the year when clicking on a year in the datepicker, but this did not account for changing the year with the next/previous year buttons. Fixes #24230 (cherry picked from commit c8d9125)
forsti0506
pushed a commit
to forsti0506/components
that referenced
this issue
Apr 3, 2022
Fix issue angular#24230 in the Datepicker Views Selection code demo. When selecting a month, set the year on the form value to the active year on the datepicker. Previously, this demo would only set the year when clicking on a year in the datepicker, but this did not account for changing the year with the next/previous year buttons. Fixes angular#24230
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Demo and steps to reproduce the issue
This issue affects the DatePicker component. When using the next/previous year navigation buttons - the year does not correctly update. This results in the value not reflecting the users intention.
The official component gallery at material.angular.io exhibits this bug
Demo URL (required)*: https://material.angular.io/components/datepicker/overview#datepicker-views-selection
Detailed Reproduction Steps
Explain the expected behavior
Expected behaviour is that the selected value is January 2021, or 01/2021 - reflecting the year shown in the interface.
Explain the current behavior
The selected value has the incorrect year, and remains at the originally selected year. The correct month is selected regardless of which month you pick, but the year does not change.
Discuss the use-case or motivation for changing the existing behavior
The existing behaviour means that the value does not reflect the intended month selection of the user.
List the affected versions of AngularJS, Material, OS, and browsers
Add anything else we should know
I am in the en-GB locale, we use the MM-YYYY syntax for month/year only.
Stack Trace
Screenshots
Reproduced on official component gallery, white circle denotes clicked item.





The text was updated successfully, but these errors were encountered: