Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(datetime): do not animate to new value when multiple values in di…
…fferent months are set (#28847) Issue number: resolves #28602 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> We animate to the new date when the value is changed, but we do not account for multiple selection. This behavior is valuable for when the value is set asynchronously on a different month than what it shown. However, this is confusing when there are multiple dates selected in different months, because we do not reasonably know which date to animate to. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> Datetime no longer animates to the new value if more than one date is selected, and the selected dates aren't all in the same month. An alternative strategy would be to always animate unless one of the selected dates is in the month currently being viewed. However, this would still mean guessing at which value the user wants to see, which we are trying to avoid. Based on this PR: #28605 ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com> --------- Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
- Loading branch information