Merge pull request #2 from Iconica-Development/hotfix/datepicker

Hotfix/datepicker
This commit is contained in:
Gorter-dev 2022-11-29 15:07:34 +01:00 committed by GitHub
commit 739198b0b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -57,7 +57,7 @@ class _MyHomePageState extends State<MyHomePage> {
},
),
FlutterFormInputDateTime(
inputType: FlutterFormDateTimeType.dateTime,
inputType: FlutterFormDateTimeType.date,
dateFormat: DateFormat('dd/MM/yyyy HH:mm'),
onChanged: (v) {
print('Date changed to $v');

View file

@ -128,7 +128,7 @@ class _DateInputFieldState extends ConsumerState<DateTimeInputField> {
keyboardType: TextInputType.none,
readOnly: true,
key: Key(currentValue.toString()),
initialValue: widget.initialValue,
initialValue: currentValue.isEmpty ? widget.initialValue : currentValue,
onSaved: (value) => widget.onSaved?.call(value),
onTap: () async {
String userInput = await getInputFromUser(widget.inputType);