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
prevent manual text input #7
Comments
I'm on mobile so I can't check right now, but I have a strong suspicion removing those lines will have side effects. I'll look into adding an editable option. |
So I started implementing this but having a text field that is focusable but not editable isn't supported in the platform. The best option I could see was to override any changes to the text that were made manually, but then I realized instead of putting in an ugly hack, your use case shouldn't actually use this widget. You should just use a |
I guess this could be used: https://stackoverflow.com/questions/44490622/disable-a-text-edit-field-in-flutter. Would be a shame to create a new package just with this feature! |
Focus is currently how the input knows to show the picker dialog. I may be able to wrap it in a gesture detector. It may actually make some of the logic cleaner. |
I think you can just do node.unfocus() immediately before launching the date input function. |
Added support for this in #8. |
Fixed in v0.1.5 |
Hi,
just wondering if it would be best to prevent people typing in dates by hand? Or having a little logic to disable this if wanted. The former is achievable by removing parent.controller.text.isEmpty && previousValue.isEmpty. Want a pull request?
cheers,
Andy.
The text was updated successfully, but these errors were encountered: