Skip to content

Cupertino DateTimePicker initialDateTime issue? #28730

Closed

Description

@exgonline

When I set the minute Interval to 15 and set the initial date time as below, the minutes show as 45 when the picker displays. If I set the initial date time to end in 45 mins, the picker shows the minutes as 15 when it displays. 30mins and 00min are correct. If I change the interval to 1, everything is ok!

[flutter] flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.2.1, on Mac OS X 10.13.6 17G5019, locale en-GB)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] VS Code (version 1.31.1)
[✓] Connected device (1 available)

• No issues found!
exit code 0
initialTime = DateTime.parse( "2019-03-01 20:15:00")
showModalBottomSheet(
        context: context,
        builder: (BuildContext context) {
          return Container(
            height: 250.0,
            child: CupertinoDatePicker(
              mode: CupertinoDatePickerMode.time,
              minuteInterval: 15,
              use24hFormat: true,
              initialDateTime: initialTime,
              onDateTimeChanged: (DateTime value) {                           
              },
            ),
          );
        });

Activity

  1. added
    frameworkflutter/packages/flutter repository. See also f: labels.
    p: cupertino_uicupertino_ui package in flutter/packages
    on Mar 5, 2019
  2. xster commented on Mar 12, 2019

    @xster
    Member

    We definitely need a test for this :(

  3. github-actions commented on Aug 30, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  4. locked as resolved and limited conversation to collaborators on Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

frameworkflutter/packages/flutter repository. See also f: labels.p: cupertino_uicupertino_ui package in flutter/packages

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions