mirror of
https://github.com/Iconica-Development/flutter_input_library.git
synced 2025-05-18 17:03:45 +02:00
fix date picker not saving values
This commit is contained in:
parent
a6a3a389b5
commit
01acdf22aa
2 changed files with 2 additions and 2 deletions
|
@ -57,7 +57,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
FlutterFormInputDateTime(
|
FlutterFormInputDateTime(
|
||||||
inputType: FlutterFormDateTimeType.dateTime,
|
inputType: FlutterFormDateTimeType.date,
|
||||||
dateFormat: DateFormat('dd/MM/yyyy HH:mm'),
|
dateFormat: DateFormat('dd/MM/yyyy HH:mm'),
|
||||||
onChanged: (v) {
|
onChanged: (v) {
|
||||||
print('Date changed to $v');
|
print('Date changed to $v');
|
||||||
|
|
|
@ -128,7 +128,7 @@ class _DateInputFieldState extends ConsumerState<DateTimeInputField> {
|
||||||
keyboardType: TextInputType.none,
|
keyboardType: TextInputType.none,
|
||||||
readOnly: true,
|
readOnly: true,
|
||||||
key: Key(currentValue.toString()),
|
key: Key(currentValue.toString()),
|
||||||
initialValue: widget.initialValue,
|
initialValue: currentValue.isEmpty ? widget.initialValue : currentValue,
|
||||||
onSaved: (value) => widget.onSaved?.call(value),
|
onSaved: (value) => widget.onSaved?.call(value),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
String userInput = await getInputFromUser(widget.inputType);
|
String userInput = await getInputFromUser(widget.inputType);
|
||||||
|
|
Loading…
Reference in a new issue