-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Removed the inputFormatters from the text input fields used by the Date Pickers #63461
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
Removed the inputFormatters from the text input fields used by the Date Pickers #63461
Conversation
rami-a
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the solution is that we choose to remove usage of MaterialLocalizations.dateSeparator as a text input formatter, should we just completely remove dateSeparator from our arb files as well? I did a quick sweep of the flutter repo and it seems like the only two places where it's used is already removed in this PR.
HansMuller
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Yeah, we can remove this field as it will no longer be needed after this PR. I didn't include it here as I was trying to keep the PR somewhat contained so that we would have a better change of getting it cherry picked. |
* Fix SliverList scrollOffsetCorrection 0 case (#62615) * Case insensitive check flavor names against Xcode schemes (#61140) * Address misc time picker design issues (#62803) * Update to the latest localizations (#63026) * Removed the inputFormatters from the text input fields used by the Date Pickers (#63461) * Fix App.framework path in Podfile (#63412) * Update engine hash to 1.20.2 Co-authored-by: Kate Lovett <[email protected]> Co-authored-by: Jenn Magder <[email protected]> Co-authored-by: Rami <[email protected]> Co-authored-by: Shi-Hao Hong <[email protected]> Co-authored-by: Darren Austin <[email protected]>
* Update engine hash to 1.21.0-9.1.pre * Removed the inputFormatters from the text input fields used by the Date Pickers (#63461) * Fix App.framework path in Podfile (#63412) Co-authored-by: Darren Austin <[email protected]> Co-authored-by: Jenn Magder <[email protected]>
johnlegend3476
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JLinsalatoDavid
darrenaustin
johnlegend3476
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Description
The current Date Picker implementation uses
inputFormatterson the text input fields to restrict the input text to only digits and a date separator. However, there are some locales that don't have a single character separator, so this restriction is causing more problems than it is helping (see #63373). This PR removes the inputFormatters and just lets the user enter what ever characters they want and lets the validation take care of the error.Related Issues
Fixes: #63373
Tests
Updated the invalid format text test to check that non-digit characters are allowed, but will generate an error if submitted.
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them?