How can I get the Flutter FormBuilderDateTimePicker
to only show the date? The code below produces a time picker after the date picker closes and the output is:
flutter: 2022-04-02 00:00:00.000
I could strip the time using DateTime.timeonly()
but that doesn't solve the problem. This should be a date only field.
FormBuilderDateTimePicker(
name: 'date_established',
format: DateFormat('dd/MM/yyyy'),
enabled: true,
decoration: InputDecoration(
labelText: 'Date Established',
labelStyle: TextStyle(
color: Colors.white,
fontSize: 16.0,
fontWeight: FontWeight.normal)),
style: TextStyle(
color: Colors.white,
fontSize: 16.0,
fontWeight: FontWeight.normal),
),