{"id":32305713,"url":"https://github.com/alanchan-dev/omnidatetimepicker","last_synced_at":"2025-10-23T06:54:43.374Z","repository":{"id":39656214,"uuid":"437521371","full_name":"alanchan-dev/OmniDateTimePicker","owner":"alanchan-dev","description":"A Flutter DateTime picker package.","archived":false,"fork":false,"pushed_at":"2025-07-28T08:27:22.000Z","size":731,"stargazers_count":53,"open_issues_count":16,"forks_count":86,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-23T06:54:26.893Z","etag":null,"topics":["dart","datetime-picker","datetimepicker","flutter","flutter-package","flutter-widget","material","material3"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alanchan-dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"alanchan94","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"custom":null}},"created_at":"2021-12-12T11:04:56.000Z","updated_at":"2025-09-24T12:06:58.000Z","dependencies_parsed_at":"2025-03-04T03:24:37.366Z","dependency_job_id":"1d6a12cc-9db9-4e2a-a806-851bef3358ee","html_url":"https://github.com/alanchan-dev/OmniDateTimePicker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/alanchan-dev/OmniDateTimePicker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanchan-dev%2FOmniDateTimePicker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanchan-dev%2FOmniDateTimePicker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanchan-dev%2FOmniDateTimePicker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanchan-dev%2FOmniDateTimePicker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanchan-dev","download_url":"https://codeload.github.com/alanchan-dev/OmniDateTimePicker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanchan-dev%2FOmniDateTimePicker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280577133,"owners_count":26354072,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-23T02:00:06.710Z","response_time":142,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","datetime-picker","datetimepicker","flutter","flutter-package","flutter-widget","material","material3"],"created_at":"2025-10-23T06:54:41.784Z","updated_at":"2025-10-23T06:54:43.367Z","avatar_url":"https://github.com/alanchan-dev.png","language":"Dart","funding_links":["https://ko-fi.com/alanchan94","https://ko-fi.com/X8X2YYHL7"],"categories":[],"sub_categories":[],"readme":"\u003c!--\nThis README describes the package. If you publish this package to pub.dev,\nthis README's contents appear on the landing page for your package.\n\nFor information about how to write a good package README, see the guide for\n[writing package pages](https://dart.dev/guides/libraries/writing-package-pages).\n\nFor general information about developing packages, see the Dart guide for\n[creating packages](https://dart.dev/guides/libraries/create-library-packages)\nand the Flutter guide for\n[developing packages and plugins](https://flutter.dev/developing-packages).\n--\u003e\n\n# Omni DateTime Picker\n\n[![pub package](https://img.shields.io/pub/v/omni_datetime_picker.svg)](https://pub.dev/packages/omni_datetime_picker)\n\nA DateTime picker that lets user select a date and the time, with start \u0026 end as a range.\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/X8X2YYHL7)\n\n## Screenshots\n\n|                                                                    Light                                                                     |                                                                    Dark                                                                    |\n| :------------------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------: |\n| ![Omni DateTime Range Picker - Light](https://raw.githubusercontent.com/alanchan-dev/OmniDateTimePicker/master/screenshots/lightmode_v2.png) | ![Omni DateTime Range Picker - Dark](https://raw.githubusercontent.com/alanchan-dev/OmniDateTimePicker/master/screenshots/darkmode_v2.png) |\n\n## Getting started\n\nAdd this to your package's pubspec.yaml file and run `flutter pub get`:\n\n```yaml\ndependencies:\n  omni_datetime_picker: ^2.3.1\n```\n\nNow in your Dart code, you can use:\n\n```dart\nimport 'package:omni_datetime_picker/omni_datetime_picker.dart';\n```\n\n## Usage\n\nSimple usage:\n\nOmniDateTimePicker\n\n```dart\nDateTime? dateTime = await showOmniDateTimePicker(context: context);\n```\n\nOmniDateTimeRangePicker\n\n```dart\nList\u003cDateTime\u003e? dateTimeList = await showOmniDateTimeRangePicker(context: context);\n```\n\nCustom properties:\n\nOmniDateTimePicker\n\n```dart\nDateTime? dateTime = await showOmniDateTimePicker(\n                    context: context,\n                    initialDate: DateTime.now(),\n                    firstDate:\n                        DateTime(1600).subtract(const Duration(days: 3652)),\n                    lastDate: DateTime.now().add(\n                      const Duration(days: 3652),\n                    ),\n                    is24HourMode: false,\n                    isShowSeconds: false,\n                    minutesInterval: 1,\n                    secondsInterval: 1,\n                    isForce2Digits: false,\n                    borderRadius: const BorderRadius.all(Radius.circular(16)),\n                    constraints: const BoxConstraints(\n                      maxWidth: 350,\n                      maxHeight: 650,\n                    ),\n                    transitionBuilder: (context, anim1, anim2, child) {\n                      return FadeTransition(\n                        opacity: anim1.drive(\n                          Tween(\n                            begin: 0,\n                            end: 1,\n                          ),\n                        ),\n                        child: child,\n                      );\n                    },\n                    transitionDuration: const Duration(milliseconds: 200),\n                    barrierDismissible: true,\n                    barrierColor: const Color(0x80000000),\n                    selectableDayPredicate: (dateTime) {\n                      // Disable 25th Feb 2023\n                      if (dateTime == DateTime(2023, 2, 25)) {\n                        return false;\n                      } else {\n                        return true;\n                      }\n                    },\n                    type: OmniDateTimePickerType.dateAndTime,\n                    title: Text('Select Date \u0026 Time'),\n                    titleSeparator: Divider(),\n                    separator: SizedBox(height: 16),\n                    padding: EdgeInsets.all(16),\n                    insetPadding: EdgeInsets.symmetric(horizontal: 40, vertical: 24),\n                    theme: ThemeData.light(),\n                    actionsBuilder: (context, confirmCallback, cancelCallback) {\n                      return Row(\n                        mainAxisAlignment: MainAxisAlignment.spaceEvenly,\n                        children: [\n                          TextButton(\n                            onPressed: cancelCallback,\n                            child: Text('Cancel'),\n                          ),\n                          ElevatedButton(\n                            onPressed: confirmCallback,\n                            child: Text('Confirm'),\n                          ),\n                        ],\n                      );\n                    },\n                  );\n```\n\nOmniDateTimeRangePicker\n\n```dart\nList\u003cDateTime\u003e? dateTimeList =\n                      await showOmniDateTimeRangePicker(\n                    context: context,\n                    startInitialDate: DateTime.now(),\n                    startFirstDate:\n                        DateTime(1600).subtract(const Duration(days: 3652)),\n                    startLastDate: DateTime.now().add(\n                      const Duration(days: 3652),\n                    ),\n                    endInitialDate: DateTime.now(),\n                    endFirstDate:\n                        DateTime(1600).subtract(const Duration(days: 3652)),\n                    endLastDate: DateTime.now().add(\n                      const Duration(days: 3652),\n                    ),\n                    is24HourMode: false,\n                    isShowSeconds: false,\n                    minutesInterval: 1,\n                    secondsInterval: 1,\n                    isForce2Digits: false,\n                    isForceEndDateAfterStartDate: true,\n                    onStartDateAfterEndDateError: () {\n                      // Handle error when start date is after end date\n                      print('Start date cannot be after end date!');\n                    },\n                    borderRadius: const BorderRadius.all(Radius.circular(16)),\n                    constraints: const BoxConstraints(\n                      maxWidth: 350,\n                      maxHeight: 650,\n                    ),\n                    transitionBuilder: (context, anim1, anim2, child) {\n                      return FadeTransition(\n                        opacity: anim1.drive(\n                          Tween(\n                            begin: 0,\n                            end: 1,\n                          ),\n                        ),\n                        child: child,\n                      );\n                    },\n                    transitionDuration: const Duration(milliseconds: 200),\n                    barrierDismissible: true,\n                    barrierColor: Colors.black54,\n                    startSelectableDayPredicate: (dateTime) {\n                      // Disable 25th Feb 2023 for start date\n                      if (dateTime == DateTime(2023, 2, 25)) {\n                        return false;\n                      } else {\n                        return true;\n                      }\n                    },\n                    endSelectableDayPredicate: (dateTime) {\n                      // Disable 26th Feb 2023 for end date\n                      if (dateTime == DateTime(2023, 2, 26)) {\n                        return false;\n                      } else {\n                        return true;\n                      }\n                    },\n                    type: OmniDateTimePickerType.dateAndTime,\n                    title: Text('Select Date \u0026 Time Range'),\n                    titleSeparator: Divider(),\n                    startWidget: Text('Start'),\n                    endWidget: Text('End'),\n                    separator: SizedBox(height: 16),\n                    defaultTab: DefaultTab.start,\n                    padding: EdgeInsets.all(16),\n                    insetPadding: EdgeInsets.symmetric(horizontal: 40, vertical: 24),\n                    theme: ThemeData.light(),\n                    actionsBuilder: (context, confirmCallback, cancelCallback) {\n                      return Row(\n                        mainAxisAlignment: MainAxisAlignment.spaceEvenly,\n                        children: [\n                          TextButton(\n                            onPressed: cancelCallback,\n                            child: Text('Cancel'),\n                          ),\n                          ElevatedButton(\n                            onPressed: confirmCallback,\n                            child: Text('Confirm'),\n                          ),\n                        ],\n                      );\n                    },\n                  );\n```\n\nThe returned value of showOmniDateTimeRangePicker() will be a List\u003cDateTime\u003e with two DateTime:\n\n```dart\n[startDateTime, endDateTime].\n```\n\n## Usage with more flexibility\n\n`OmniDateTimePicker` is now available for use directly as a widget instead of the prebuilt dialogs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanchan-dev%2Fomnidatetimepicker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanchan-dev%2Fomnidatetimepicker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanchan-dev%2Fomnidatetimepicker/lists"}