Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

默认的初始化时间不对 #142

Closed
youxinLu opened this issue Apr 16, 2021 · 1 comment
Closed

默认的初始化时间不对 #142

youxinLu opened this issue Apr 16, 2021 · 1 comment

Comments

@youxinLu
Copy link

` showPickerDateTime(BuildContext context) {
Picker(
adapter: DateTimePickerAdapter(
type: PickerDateTimeType.kYMDHM,
isNumberMonth: true,
yearSuffix: "年",
monthSuffix: "月",
daySuffix: "日",
minuteInterval: 1,
minHour: 8,
maxHour: 20,
value: new DateTime.now(),
// twoDigitYear: true,
),
textAlign: TextAlign.right,
headerColor: AppColors.COLOR_F0F0F0,
cancelText: AppStrings.CANCEL,
confirmText: AppStrings.CONFIRM,
looping:true,
cancelTextStyle: TextStyle(color: AppTheme.appThemeData.primaryColor,fontSize: ScreenUtil().setSp(AppDimens.DIMENS_42)),
confirmTextStyle: TextStyle(color: AppTheme.appThemeData.primaryColor,fontSize: ScreenUtil().setSp(AppDimens.DIMENS_42)),
selectionOverlay:null,
selectedTextStyle: TextStyle(color: Colors.blue),

    onConfirm: (Picker picker, List value) {
      print(value.toString());
      print(picker.adapter.getText());
      // _date = (picker.adapter as DateTimePickerAdapter).value;
    },
    onSelect: (Picker picker, int index, List<int> selecteds) {

    }
).showModal(context);

}`

小时字段默认选中的都是设置的maxHour或者是23

@yangyxd
Copy link
Owner

yangyxd commented Jun 25, 2021

@youxinLu 谢谢,这个问题将在 2.0.2 中修复,等待更新即可

@yangyxd yangyxd closed this as completed Jun 25, 2021
yangyxd pushed a commit that referenced this issue Jun 25, 2021
# Add demo DurationPicker
# Add onConfirmBefore callback event;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants