date_time_picker icon indicating copy to clipboard operation
date_time_picker copied to clipboard

How to capture AM and PM ?

Open iesmail-znz opened this issue 3 years ago • 4 comments

I am using the 12 Hr Format and would like to also capture AM and PM. Currently it only returns the time. Here's my code:

                     DateTimePicker(
                          type: DateTimePickerType.time,
                          use24HourFormat: false,
                          locale: Locale('pt', 'BR'),
                          icon: Icon(Icons.access_time),
                          timeLabelText: "Choose Opening Time",
                
                          onChanged: (val) => storeTiming.startTime = val,
                          validator: (val) {
                            print(val);
                            return null;
                          },
                          onSaved: (val) => storeTiming.startTime = val,
                        ),
          

What am I missing?

iesmail-znz avatar Jul 14 '21 17:07 iesmail-znz

should be fixed with #42

sxtfv avatar Jul 15 '21 10:07 sxtfv

is it fixed yet? I'm still facing this issue

suvindran3 avatar Oct 15 '21 10:10 suvindran3

did anyone find the solution for this i'm trying to figure how to get AM PM in string

divyanshu2345 avatar Jun 27 '22 09:06 divyanshu2345

Obx(() { return DateTimePicker( type: DateTimePickerType.time, initialTime: TimeOfDay.now(), cursorColor: Colors.yellow, initialValue: controller.startTime.value,) I am using GEtx and I solved it by making him listen to observable value

jaafarismael avatar Nov 18 '22 22:11 jaafarismael