fix(module:calendar): year dropdown update issue when date is changed programmatically#8286
Merged
Laffery merged 4 commits intoNG-ZORRO:masterfrom Apr 17, 2024
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8286 +/- ##
=======================================
Coverage 91.57% 91.57%
=======================================
Files 533 533
Lines 18331 18337 +6
Branches 2798 2800 +2
=======================================
+ Hits 16787 16793 +6
Misses 1226 1226
Partials 318 318 ☔ View full report in Codecov by Sentry. |
Collaborator
|
LGTM |
Nicoss54
approved these changes
Dec 13, 2023
tegola
reviewed
Jan 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The year dropdown in the calendar works as follows:
• It displays the years within a 10-year range of the selected year.
• For example, if the selected year is 2015, the year dropdown shows the years from 2005 to 2024.
The bug is that the year dropdown does not update when the date is changed programmatically.
• For instance, if the selected year is 2005, the year dropdown shows the years from 1995 to 2014. If the date is changed programmatically to today, the selected year is 2023, but the year dropdown still shows the years from 1995 to 2014. This results in an empty year dropdown.
• This issue also occurs if the initial date of the calendar is set to more than 10 years ago. (For example, in the basic usage of the calendar, the initial date's year is 2012, but the year dropdown does not include 2012, so it is shown as blank.)
Issue Number: #8284
What is the new behavior?
• The year dropdown is updated when the date is changed programmatically to a different year.
Does this PR introduce a breaking change?
Other information