我怎样才能让Flitter FormBuilderDateTimePicker
只显示日期?以下代码在日期 Select 器关闭后生成一个时间 Select 器,输出为:
Flutter :2022-04-02 00:00:00.000
我可以用DateTime.timeonly()
来减少时间,但这并不能解决问题.这应该是一个仅限日期的字段.
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),
),