Giter Site home page Giter Site logo

ykrank / flutter_cupertino_datetime_picker Goto Github PK

View Code? Open in Web Editor NEW
60.0 60.0 51.0 451 KB

Fork from flutter_cupertino_date_picker https://github.com/wuzhendev/flutter-cupertino-date-picker, but day seperate

License: Apache License 2.0

Java 0.13% Objective-C 0.64% Dart 99.15% Shell 0.09%

flutter_cupertino_datetime_picker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flutter_cupertino_datetime_picker's Issues

Color of the selection boxes + their size

Hello,

Is it possible to update the theme settings to include the color of the selection boxes? It is currently gray only and I haven't found a way to change it.

Also, I have noticed that the selection boxes have a constant size. It would be great if that size could be adjusted as well (see in the image, "September" is seen outside of the selection box. Or maybe IntrinsicWidth could help here.

Thanks!

Screenshot 2021-06-03 at 20 24 58

设置最小时间出现的bug

  • _showDatePickerForStartDateTime(BuildContext context) {
    iOSDatePicker.DatePicker.showDatePicker(
    context,
    pickerMode: iOSDatePicker.DateTimePickerMode.datetime,
    minDateTime: DateTime.now().toUtc(),
    initialDateTime:
    _isSetStartTime ? _startTimeController : DateTime.now().toUtc(),
    dateFormat: "yyyy|MM|dd HH:mm",
    locale: Get.find().locale == Locale('zh', 'TW')
    ? DateTimePickerLocale.zh_cn
    : DateTimePickerLocale.en_us,
    onConfirm: (DateTime dateTime, List selectedIndex) {
    print(dateTime);
    setState(() {
    _startTimeController = dateTime;
    _isSetStartTime = true;
    });
    },
    onCancel: () {},
    onClose: () {},
    );
    }

当我给最小时间设置为UTC当前时间,选择分钟和小时必须得大于本地时间才能够初始化成功,比如

当前北京时间为2022-12-20 11:00:00 , UTC当前时间为2022-12-20 3:00:00,也就是minDateTime
我选择UTC时间为2022-12-20 3:20:00,这时候我再次打开选择器 初始化时间应该为2022-12-20 3:20:00,但是初始化时间一直是当前的UTC时间(正确显示应该是我已经选择的时间2022-12-20 3:20:00),
但是我选择UTC时间为2022-12-20 11:20:00(大于minDateTime的北京时间),再次打开选择器时,初始化就是正常的

另外,设置最小时间为当前时间后,只更改小时,实际获取到的值,和我选中的不一致(分钟少了几十,这个值不是固定),但只要我也改变了分钟的值,就正常了

onchange日期错误

当设置initdate时,日为20,那么当滑动月份+1时,这时候onchange 中日的结果为错误,应该是没做index的处理。

No polish support

Dear developers of flutter_cupertino_datetime_picker,I wish this plugin to support Poland languge,language code is 'pl'。

Thank you all developer that contribute for this plugin.

最大时间分钟 limit 有问题

查看了源代码,应该是这部分有问题:
Screenshot 2023-05-22 at 11 15 12

比如我最大时间范围是 10:20:20,当我选择 10 点后,分钟的最大支持范围是 59 分,59 秒,按理应该是 20 分,20秒

Null Safety?

Are you going to add support for flutter 2.0?

It would be amazing if you can do it 😄

点击确定后, 回调结果错误.

Demo里DateTimePickerBottomSheet试一下这个日期:
const String MIN_DATETIME = '2022-09-27';
const String MAX_DATETIME = '9999-12-31';
const String INIT_DATETIME = '2022-09-27';
切换到2023年, 显示是正确, 回调是错误的(回调为2023-4-4).

慢速滑动,出现卡死问题

使用的时候,滑动速度慢,滑动很短时间就出现卡顿的现象,然后就会出现卡死的现象,Android平台

Issue with minutes

The minutes are only changed with onChange when I change the minutes. If I only change the month or the hour, the minute is always set to 22.

 DateTimePickerWidget(
                  minuteDivider: 1,
                  minDateTime: date, // mindate
                  //maxDateTime: DateTime(2050, 12, 30), // maxdate
                  initDateTime: date, // initialDateTime,
                  dateFormat: 'd MMMM HH:mm',
                  locale: DateTimePickerLocale.de,
                  pickerTheme: DateTimePickerTheme(
                    titleHeight: 0,
                    backgroundColor: Colors.transparent,
                    cancel: SizedBox(height: 0),
                    confirm: SizedBox(height: 0),
                    itemTextStyle: TextStyle(color: Colors.black, fontSize: 16),
                  ),
                  onChange: (
                    date,
                    values,
                  ) {
                    setState(() {
                      newDate = date;
                    });

Can't select a past time.

Thanks for the package.

I am using CupertinoDatePicker widget with CupertinoDatePickerMode.time mode. I want users to select whatever time they want.
As of what's happing is the user can not select a past time
Ex Time is 10:00 AM so the User can not select past time than 10.

I think you should give the option to something.

Here is the SS

Simulator Screen Shot - iPhone 11 Pro Max - 2021-05-07 at 10 26 31

Error with DiagnosticableMixin

Hi! Your package doesn't work because of using DiagnosticableMixin
Error: Type 'DiagnosticableMixin' not found.
class DateTimePickerTheme with DiagnosticableMixin {

ripple effect

is it possible to remove the ripple effect on the done/cancel buttons?

时间限制有问题,版本3.0.0

比如最小时间当前,最大时间未来某一天,展示年月日
最大时间6月14日,年何月滑动到底部,日滑动到底部后多出来直到月底30号

Seconds are always 0

DateTimePickerMode = DateTimePickerMode.datetime
but onConfirm seconds are always 0
because
datetime_picker_widget.dart
line = 203
DateTime(_currYear, _currMonth, _currDay, _currHour, _currMinute, 0);

Month picker bug

When I use the date yyyy-MMMM as a date format, the month picker seems to adding/decreasing the returned datetime value on onConfirm per 30 days, not per 1 month. So, it may cause issue for a month that has 31 days.

For an example, when I set the initialdate to now, 31st August. Then I move the month picker to June, it gives me 2021-07-01. But the correct returned date should be 2021-06-31 or to be precise 2021-06-30 right?

For now I'm mitigating this issue like this:

  DateTime _maxDateTime =
      DateTime(DateTime.now().year, DateTime.now().month, 1);
  DateTime _initialDateTime =
      DateTime(DateTime.now().year, DateTime.now().month, 1);

I hope anyone can check up on this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.