TimePicker onSubmit function return
HasanBS opened this issue · comments
Hasan Basri Şenkul commented
For the time picker, onSubmit function always return Datetime.now(), _renderDateTimePicker function need to update selectedDateTime
Container _renderDateTimePicker(CupertinoDatePickerMode mode) {
return Container(
height: 200,
child: CupertinoDatePicker(
mode: mode,
onDateTimeChanged: (DateTime date) {
this.selectedDateTime = date; // That part is missing
this.widget.onChange?.call(date);
},
initialDateTime: this.widget.initialDateTime,
maximumDate: this.widget.maxDateTime,
minimumDate: this.widget.minDateTime,
use24hFormat: this.widget.use24hFormat),
);
}
Kouki Badr commented
Okay @HasanBS I will check it and fix it
I'll let you know about the new fixes
Kouki Badr commented
Thanks a lot @HasanBS the problem is fixed now
I will publish a new version of the package