GaspardMerten / date_field

Flutter DateField and DateFormField
Other
46 stars 32 forks source link

use24hFormat doesn't work with Material on DateTimeFormField #29

Closed dsyrstad closed 2 years ago

dsyrstad commented 2 years ago

If you construct a DateTimeFormField like so:

DateTimeFormField(
      mode: DateTimeFieldPickerMode.dateAndTime,,
      dateFormat: DateFormat.yMd().add_jm(),
      use24hFormat: false,
      ...
    )

when the time picker is displayed, it is in 24h format, not 12h format as specified.

I'm using the Material widgets with date_field 3.0.0. It appears that the showMaterialTimePicker() function does not call showTimePicker() (https://api.flutter.dev/flutter/material/showTimePicker.html) in a 12h/24h method as described in the doc.

GaspardMerten commented 2 years ago

Hello @dsyrstad,

First of all, thank you for bringing the matter to my attention.

Could you please confirm that the issue has now been solved (v3.0.1)?

dsyrstad commented 2 years ago

@GaspardMerten Perfect! It is working now. Thank you!