-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
Use case
When entering a Date in input mode rather than calendar mode, applications are unable to specify a format to parse other than en_US. This can be seen here. This results in applications being forced to use the default en_US parsing of the input text even when that is not the DateFormat.
The date_range_form_field package wraps the showDateRangePicker function into a FormField widget. It displays the selected date in a DateFormat specified by the application. However, as stated above, in the showDateRangePicker, the input format will always be en_US, regardless of the DateFormat being used in the date_range_form_field package or elsewhere in the app. In order for date_range_form_field to do the right thing, it needs to have a change in showDateRangePicker. For consistency, showDatePicker should be updated as well.
Proposal
Add an optional DateFormat parameter to showDatePicker and showDateRangePicker to specify what DateFormat should be displayed and parsed.