Skip to content

Commit 36e9c36

Browse files
committed
fix: change DateTime Picker behavior when InputType==both
1 parent 11a0eef commit 36e9c36

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/src/fields/form_builder_date_time_picker.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ class _FormBuilderDateTimePickerState extends FormBuilderFieldDecorationState<
306306
if (date != null) {
307307
if (!mounted) break;
308308
final time = await _showTimePicker(currentValue);
309-
newValue = combine(date, time);
309+
if(time == null) {
310+
newValue = null;
311+
} else {
312+
newValue = combine(date, time);
313+
}
310314
}
311315
break;
312316
default:

0 commit comments

Comments
 (0)