-
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
ion-datetime ignores mode attribute #23336
Comments
Source code navigations using git have shown that most probably this is because the function is called with |
Thanks for the issue. Can you reproduce this in an Ionic starter app and provide a link to the repo? I am setting |
Thanks for the issue! This issue has been labeled as Please reproduce this issue in an Ionic starter application and provide a way for us to access it (GitHub repo, StackBlitz, etc). Without a reliable code reproduction, it is unlikely we will be able to resolve the issue, leading to it being closed. If you have already provided a code snippet and are seeing this message, it is likely that the code snippet was not enough for our team to reproduce the issue. For a guide on how to create a good reproduction, see our Contributing Guide. |
Oh wait I had it backwards. I can see the issue if you start the app in iOS mode but force MD on the datetime component. I will add this to our datetime tracker here: #16630. We are also doing a complete revamp of the datetime picker for Framework v6, and I can confirm that this issue is fixed in that version. I am going to close this in favor of the main datetime issue tracker (#16630). Thanks! |
@liamdebeasi is there any chance this would land in v5 too? |
We are redesigning the date picker with v6, so we likely will not backport it to v5. That being said, v6 should be an easy upgrade with minimal breaking changes. |
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. |
Bug Report
Ionic version:
[ ] 4.x
[x] 5.x
Current behavior:
ion-datetime ignores "mode" attribute and "mode" property in "[pickerOptions]". Instead it follows either platform it's started on, or mode set in "forRoot".
Expected behavior:
Date time picker should respect "mode" value set either as an attribute or as a property in the "pickerOptions".
Steps to reproduce:
Scaffold a basic application and add to a template "ion-datetime" component. Set "mode" attribute to "md". Launch the app in browser using iOS simulator. Reload the page to make sure it uses iOS mode. Open the picker and observe iOS picker instead of md.
Related code:
Didn't find Stackblitz template for the v5 ionic so I didn't reproduce the bug as it doesn't require anything special in the setup to reproduce it.
Other information:
I thought that probably it would work correctly if I used a second
IonicModule.forRoot
withmode: "md"
in the module where the picker is used, however it had no effect. Looks like it uses some global service/overlay which disrespects the mode in picker.Ionic info:
The text was updated successfully, but these errors were encountered: