Adding the possibility to specify the initial date selected in the date picker dialog.

This commit is contained in:
Gaspard Merten 2021-09-25 18:08:03 +02:00
parent d3fe446cdc
commit bf47b6c6c6
6 changed files with 27 additions and 3 deletions

View file

@ -24,6 +24,7 @@ class DateTimeFormField extends FormField<DateTime> {
DateFormat? dateFormat,
DateTime? firstDate,
DateTime? lastDate,
DateTime? initialDate,
ValueChanged<DateTime>? onDateSelected,
InputDecoration? decoration,
DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar,
@ -54,6 +55,7 @@ class DateTimeFormField extends FormField<DateTime> {
return DateTimeField(
firstDate: firstDate,
initialDate: initialDate,
lastDate: lastDate,
decoration: effectiveDecoration,
initialDatePickerMode: initialDatePickerMode,