koukibadr / Bottom-Picker

Home Page:https://pub.dev/packages/bottom_picker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TimePicker onSubmit function return

HasanBS opened this issue · comments

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),
    );
  }

Okay @HasanBS I will check it and fix it
I'll let you know about the new fixes

Thanks a lot @HasanBS the problem is fixed now
I will publish a new version of the package