Repository navigation
showDatePicker manual input does not support inputFormatters #181043
Description
Use case
Allow customization of the manual input field in showDatePicker
Problem
When using showDatePicker with DatePickerEntryMode.input or inputOnly, the manual date entry field does not expose any way to customize text input behavior.
Specifically, it is not possible to provide:
TextInputFormatter(e.g. input masks likedd/MM/yyyy)- A custom
TextEditingController - Any hook or builder to customize the internal
TextField
This makes it impossible to enforce locale-specific date formats or guide users while typing.
Why this is an issue
- Many locales rely on strict date formats (e.g.
dd/MM/yyyyin most of the world) - Free text input easily leads to invalid or ambiguous dates
- Developers are forced to disable manual input entirely (
calendarOnly) or reimplement a custom date picker - This breaks consistency with
TextField, which already supports formatters and controllers
This is not a bug, but a limitation in the current API that affects extensibility and usability.
Current workaround
- Disable manual input using
DatePickerEntryMode.calendarOnly, or - Build a fully custom date picker, losing native Material UX and accessibility benefits
Flutter version
Flutter 3.38.7 • channel stable
Tools • Dart 3.10.7 • DevTools 2.51.1
Image of the Issue
The screenshot below shows the manual date input mode in showDatePicker, where the text field does not apply any input mask or formatting, allowing free-form input that can lead to invalid or ambiguous dates.
Proposal
Provide a way to add/customize the manual input field used by showDatePicker, for example:
- Allow passing custom
TextInputFormatterinstances. - Allow providing a
TextEditingController. - Or expose a builder or callback to customize the internal input field.
Optionally, the framework could offer a locale-aware date input formatter that developers may choose to use.
This would allow developers to keep the native Material date picker while enforcing proper input formats.
Activity
Mairramer commentedon Jan 16, 2026
I agree that we should allow overriding or adding custom
InputFormatters. However, I believe it would be better to provide a set of predefinedDateInputFormats.In practice, we will usually use
dd/MM/yyyyorMM/dd/yyyy(depending on the locale),yyyy-MM-dd(ISO 8601), and in some casesdd-MM-yyyy. Less commonly,dd.MM.yyyymay also be needed.In addition, the internal parser must be updated accordingly to ensure that existing behavior does not break and no unexpected or inconsistent parsing occurs.
Mairramer commentedon Jan 16, 2026
@tirth-patel-nc Perhaps this is a duplicate of #97134?
tirth-patel-nc commentedon Jan 16, 2026
@thomasfranke please confirm whether #97134 #62401 #83302 are matches your case?
github-actions commentedon Feb 6, 2026
Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now.
If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones.
Thanks for your contribution.
github-actions commentedon Feb 20, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[material_ui] Support custom date input formatters via CalendarDelega…