Conversation
With monthValues set, getMonthColumnData filtered months by the min and max month in every year. With min="2020-06" and monthValues set, January to May were missing from every later year too. The branch without monthValues already checks the year. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
@breken-ai is attempting to deploy a commit to the Ionic Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
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.
Issue number: N/A (no existing issue; repro below)
What is the current behavior?
When
monthValuesis set,getMonthColumnData(core/src/components/datetime/utils/data.ts) filters the month wheel bymin.monthandmax.monthin every year, not only in the min/max year. The branch withoutmonthValuesalready checksminParts.year === year/maxParts.year === year.Example:
<ion-datetime prefer-wheel="true" min="2020-06-01" month-values="1,3,5,7,9,11">. In 2024, the month wheel shows only July, September and November. January, March and May are missing even though every date in 2024 is after min. The same happens withmax:max="2025-04-30"hides May to November in 2024 and earlier years.What is the new behavior?
monthValues.New unit tests for
getMonthColumnData()indata.spec.tscover min, max, and a check that the result matches the months shown withoutmonthValues.Red on
main(879e91d):Green with the fix:
npx stencil test --spec -- src/components/datetime/test/passes 116/116.eslint,prettier --checkandtsc --noEmit -p tsconfig.jsonare clean.Does this introduce a breaking change?
Other information
This fix was found and written with an AI coding assistant (Claude Code); the red/green runs above are from this branch.
🤖 Generated with Claude Code