form_bloc icon indicating copy to clipboard operation
form_bloc copied to clipboard

DateTimeFieldBlocBuilder doesnt display the correct month

Open rodriger06 opened this issue 4 years ago • 1 comments

Hi there,

I am using DateTimeFieldBlocBuilder in my form to allow the user pick up a date. When the date is picked, it will show in the datefield but the month portion is not properly display. see attach pics

here is my DateTimeFieldBlocBuilder code: datepickercode

here is date picker datepicker

below is the date display on the field. if you notice, the month is coming as 00. if i choose another month, it will come up with some high numbers like 43 etc also, i noticed a X icon on the far right. is it possible to have the option to disable it so it doesnt appear on the input field? wrongmonth

rodriger06 avatar May 03 '20 22:05 rodriger06

Hello, Change the DateFormat to

   format: DateFormat('dd-MM-yyyy'),

Checkout https://github.com/GiancarloCode/form_bloc/issues/79


And set

  showClearIcon: false,

GiancarloCode avatar May 03 '20 23:05 GiancarloCode