date_time_picker
date_time_picker copied to clipboard
How to capture AM and PM ?
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?
should be fixed with #42
is it fixed yet? I'm still facing this issue
did anyone find the solution for this i'm trying to figure how to get AM PM in string
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