-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: IonDateTime internal state breaks if navigating out of range #23939
Comments
Oh wow, that was incredibly quick. Thank you :-) |
Thanks for the issue. I put up a PR in #23940 and have included a dev build below if you are interested in testing it in your app:
|
I have tested it and it looks like it works, thanks! |
Glad the issue is resolved! Currently you cannot type into the time container, but we are adding that functionality soon! |
Thanks for the issue. This has been resolved via #23940, and a fix will be available in an upcoming release of the Ionic v6 beta. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prequisites
Ionic Framework Version
Current Behavior
In the new
IonDateTime
component, if I navigate to a month that is outside of the range given by min and max or to a month that is partially outside of the range while the last selected day would be out of range in this month,onIonChange
is triggered with a broken internal state that cannot be recovered. The returned value changes to something like2022-01-15T19:aN:00-aN:aN
. Selecting a valid date afterwards does not fix this and the time component remains in this broken state.Tested in ionic react 6.0.0-beta.5
Expected Behavior
onIonChange should not be triggered and the internal state of the component should not break
Steps to Reproduce
<IonDatetime min='2021-09' max='2021-10' onIonChange={(event) => {console.log(event.detail.value)}} />
Use the arrows to navigate to August or November. Observe console output.
Code Reproduction URL
No response
Ionic Info
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: