Skip to content
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

fix(datetime): confirm method now uses selected date #24827

Merged
merged 5 commits into from
Feb 23, 2022
Merged

Conversation

sean-perkins
Copy link
Contributor

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

When confirming the date using datetime's confirm() method, it will use the working parts (visible calendar month) instead of the active parts (selected calendar month). This results in incorrect date values when a user selects a date, navigates next/previous to a different calendar month and uses the confirm() API to close/dismiss the datetime overlay.

Issue URL: #24823

What is the new behavior?

  • The confirm() API uses the active parts when setting the current value.
  • Navigating to next/previous months will not affect the date value when using confirm(), unless the user selects a new date inside that month.

Does this introduce a breaking change?

  • Yes
  • No

Other information

@sean-perkins sean-perkins requested a review from a team as a code owner February 21, 2022 18:38
@github-actions github-actions bot added the package: core @ionic/core package label Feb 21, 2022
@liamdebeasi liamdebeasi self-requested a review February 22, 2022 14:01
@liamdebeasi liamdebeasi changed the title fix(datetime): confirm will use selected date fix(datetime): confirm method now uses selected date when emitting ionChange Feb 22, 2022
@liamdebeasi liamdebeasi changed the title fix(datetime): confirm method now uses selected date when emitting ionChange fix(datetime): confirm method now uses selected date Feb 22, 2022
Copy link
Contributor

@averyjohnston averyjohnston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once Liam's comment is addressed 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants