{"id":26821173,"url":"https://github.com/dylanwuzh/flutter-cupertino-date-picker","last_synced_at":"2025-10-10T11:42:42.975Z","repository":{"id":32619243,"uuid":"138131295","full_name":"dylanwuzh/flutter-cupertino-date-picker","owner":"dylanwuzh","description":"Flutter cupertino style date picker.","archived":false,"fork":false,"pushed_at":"2022-09-01T08:39:28.000Z","size":337,"stargazers_count":361,"open_issues_count":72,"forks_count":412,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-24T21:03:59.443Z","etag":null,"topics":["dart","datepicker","flutter"],"latest_commit_sha":null,"homepage":null,"language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dylanwuzh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-21T06:52:53.000Z","updated_at":"2025-05-03T10:28:24.000Z","dependencies_parsed_at":"2022-09-22T07:00:54.725Z","dependency_job_id":null,"html_url":"https://github.com/dylanwuzh/flutter-cupertino-date-picker","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/dylanwuzh/flutter-cupertino-date-picker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanwuzh%2Fflutter-cupertino-date-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanwuzh%2Fflutter-cupertino-date-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanwuzh%2Fflutter-cupertino-date-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanwuzh%2Fflutter-cupertino-date-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dylanwuzh","download_url":"https://codeload.github.com/dylanwuzh/flutter-cupertino-date-picker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dylanwuzh%2Fflutter-cupertino-date-picker/sbom","scorecard":{"id":362276,"data":{"date":"2025-08-11","repo":{"name":"github.com/dylanwuzh/flutter-cupertino-date-picker","commit":"182aa0234b83c323d2f8437e64678d04101b0f2e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":3,"reason":"Found 9/24 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 15 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T11:06:57.181Z","repository_id":32619243,"created_at":"2025-08-18T11:06:57.182Z","updated_at":"2025-08-18T11:06:57.182Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279003716,"owners_count":26083610,"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-10T02:00:06.843Z","response_time":62,"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","datepicker","flutter"],"created_at":"2025-03-30T07:18:37.138Z","updated_at":"2025-10-10T11:42:42.942Z","avatar_url":"https://github.com/dylanwuzh.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flutter Cupertino Date Picker\n\n[[pub packages]](https://pub.dartlang.org/packages/flutter_cupertino_date_picker)\n| [中文说明](./README_zh-cn.md)\n\nFlutter cupertino date picker.\n\n![Example][1]\n\n## Usage\n\n#### 1\\. Depend\n\nAdd this to you package's `pubspec.yaml` file:\n\n```yaml\ndependencies:\n  flutter_cupertino_date_picker: ^1.0.26+2\n```\n\n#### 2\\. Install\n\nRun command:\n\n```bash\n$ flutter packages get\n```\n\n#### 3\\. Import\n\nImport in Dart code:\n\n```dart\nimport 'package:flutter_cupertino_date_picker/flutter_cupertino_date_picker.dart';\n```\n\n#### 4\\. Display DatePicker\n\n##### Bottom Sheet DatePicker\n\n```dart\n/// Display date picker in bottom sheet.\n///\n/// context: [BuildContext]\n/// minDateTime: [DateTime] minimum date time\n/// maxDateTime: [DateTime] maximum date time\n/// initialDateTime: [DateTime] initial date time for selected\n/// dateFormat: [String] date format pattern\n/// locale: [DateTimePickerLocale] internationalization\n/// pickerMode: [DateTimePickerMode] display mode: date(DatePicker)、time(TimePicker)、datetime(DateTimePicker)\n/// pickerTheme: [DateTimePickerTheme] the theme of date time picker\n/// onCancel: [DateVoidCallback] pressed title cancel widget event\n/// onClose: [DateVoidCallback] date picker closed event\n/// onChange: [DateValueCallback] selected date time changed event\n/// onConfirm: [DateValueCallback] pressed title confirm widget event\nDatePicker.showDatePicker(\n  BuildContext context,\n  DateTime minDateTime,\n  DateTime maxDateTime,\n  DateTime initialDateTime,\n  String dateFormat,\n  DateTimePickerLocale locale: DATETIME_PICKER_LOCALE_DEFAULT,\n  DateTimePickerMode pickerMode: DateTimePickerMode.date,\n  DateTimePickerTheme pickerTheme: DatePickerTheme.Default,\n  DateVoidCallback onCancel,\n  DateVoidCallback onClose,\n  DateValueCallback onChange,\n  DateValueCallback onConfirm,\n});\n```\n\n##### DatePicker Widget\n\n```dart\n/// Display date picker widget.\n///\n/// minDateTime: [DateTime] minimum date time\n/// maxDateTime: [DateTime] maximum date time\n/// initialDateTime: [DateTime] initial date time for selected\n/// dateFormat: [String] date format pattern\n/// locale: [DateTimePickerLocale] internationalization\n/// pickerTheme: [DateTimePickerTheme] the theme of date time picker\n/// onCancel: [DateVoidCallback] pressed title cancel widget event\n/// onChange: [DateValueCallback] selected date time changed event\n/// onConfirm: [DateValueCallback] pressed title confirm widget event\nDatePickerWidget({\n  DateTime minDateTime,\n  DateTime maxDateTime,\n  DateTime initialDateTime,\n  String dateFormat: DATETIME_PICKER_DATE_FORMAT,\n  DateTimePickerLocale locale: DATETIME_PICKER_LOCALE_DEFAULT,\n  DateTimePickerTheme pickerTheme: DatePickerTheme.Default,\n  DateVoidCallback onCancel,\n  DateValueCallback onChange,\n  DateValueCallback onConfirm,\n})\n```\n\n##### TimePicker Widget\n\n```dart\n/// Display time picker widget.\n///\n/// minDateTime: [DateTime] minimum date time\n/// maxDateTime: [DateTime] maximum date time\n/// initialDateTime: [DateTime] initial date time for selected\n/// dateFormat: [String] date format pattern\n/// locale: [DateTimePickerLocale] internationalization\n/// pickerTheme: [DateTimePickerTheme] the theme of date time picker\n/// minuteDivider: [int] minute restriction, e.g. 5: every 5th minute will be shown (0, 5, 10, 15 ...)\n/// onCancel: [DateVoidCallback] pressed title cancel widget event\n/// onChange: [DateValueCallback] selected date time changed event\n/// onConfirm: [DateValueCallback] pressed title confirm widget event\nTimePickerWidget({\n  DateTime minDateTime,\n  DateTime maxDateTime,\n  DateTime initialDateTime,\n  String dateFormat: DATETIME_PICKER_DATE_FORMAT,\n  DateTimePickerLocale locale: DATETIME_PICKER_LOCALE_DEFAULT,\n  DateTimePickerTheme pickerTheme: DatePickerTheme.Default,\n  int minuteDivider: 1,\n  DateVoidCallback onCancel,\n  DateValueCallback onChange,\n  DateValueCallback onConfirm,\n})\n```\n\n##### DateTimePicker Widget\n\n```dart\n/// Display date time picker widget.\n///\n/// minDateTime: [DateTime] minimum date time\n/// maxDateTime: [DateTime] maximum date time\n/// initialDateTime: [DateTime] initial date time for selected\n/// dateFormat: [String] date format pattern\n/// locale: [DateTimePickerLocale] internationalization\n/// pickerTheme: [DateTimePickerTheme] the theme of date time picker\n/// onCancel: [DateVoidCallback] pressed title cancel widget event\n/// onChange: [DateValueCallback] selected date time changed event\n/// onConfirm: [DateValueCallback] pressed title confirm widget event\nDateTimePickerWidget({\n  DateTime minDateTime,\n  DateTime maxDateTime,\n  DateTime initialDateTime,\n  String dateFormat: DATETIME_PICKER_DATE_FORMAT,\n  DateTimePickerLocale locale: DATETIME_PICKER_LOCALE_DEFAULT,\n  DateTimePickerTheme pickerTheme: DatePickerTheme.Default,\n  DateVoidCallback onCancel,\n  DateValueCallback onChange,\n  DateValueCallback onConfirm,\n})\n```\n\n#### 5\\. DateTimePickerLocale\n\nSupport:\n\n- en_us: English (EN) United States ***[Default locale]***\n- ar: Arabic (ar)\n- ar_eg: Arabic (ar) Egypt\n- bn: Bengali (BN)\n- bs: Bosnian (BS)\n- de: German (DE)\n- es: Spanish (ES)\n- fr: French (FR)\n- hr: Croatian (HR)\n- hu: Hungarian (HU)\n- in_id: Bahasa (IN) Indonesia\n- it: Italian (IT)\n- jp: Japanese (JP)\n- ko: Korea (KO)\n- nl: Dutch (NL)\n- pt_br: Portuguese (PT) Brazil\n- ro: Romanian (RO)\n- ru: Russian (RU)\n- sr_cyrl: Serbia (sr) Cyrillic\n- sr_latn: Serbia (sr) Latin\n- tr: Turkish (TR)\n- uk: Ukraine (UK)\n- vi: Vietnamese (VI) Vietnam\n- zh_cn: Chinese (ZH) Simplified\n\n##### Add more language\n\n###### 1. Add language i18n file\n\nFork this project, add language file in `lib/src/i18n/` directory, e.g. `strings_en_us.dart`.\n\n```dart\n/// English (EN) United States\nclass _StringsEnUs extends _StringsI18n {\n  const _StringsEnUs();\n\n  @override\n  String getCancelText() {\n    // TODO return cancel widget's text\n    return null;\n  }\n\n  @override\n  String getDoneText() {\n    // TODO return done widget's text\n    return null;\n  }\n\n  @override\n  List\u003cString\u003e getMonths() {\n    // TODO return the array of month's full name [January, February ... December]\n    return null;\n  }\n\n  @override\n  List\u003cString\u003e getMonthsShort() {\n    // TODO return the array of month's short name [Jan, Feb ... Dec]. If return null, will substring the full name (max length is 3)\n    return null;\n  }\n\n  @override\n  List\u003cString\u003e getWeeksFull() {\n    // TODO return the array of week's full name [Monday, Tuesday ... Sunday]\n    return null;\n  }\n\n  @override\n  List\u003cString\u003e getWeeksShort() {\n    // TODO return the array of week's short name [Mon, Tue ... Sun]\n    return null;\n  }\n}\n```\n\n###### 2. Add Locale\n\nAdd language locale in `lib/src/i18n/date_picker_i18n.dart` file.\n\n```dart\nenum DateTimePickerLocale {\n  /// English (EN) United States\n  en_us,\n}\n```\n\n###### 3. Add Locale-Language relationship\n\nAdd language-locale relationship in `lib/src/i18n/date_picker_i18n.dart` file.\n\n```dart\nconst Map\u003cDateTimePickerLocale, _StringsI18n\u003e datePickerI18n = {\n  DateTimePickerLocale.en_us: const _StringsEnUs(),\n};\n```\n\n#### 6\\. dateFormat\n\n|Pattern|Meaning                |e.g.      |\n|:----|:------------------------|:---------|\n|yyyy |year                     |2019, 2020|\n|yy   |year, 2 digits           |19, 20|\n|MMMM |month                    |January(en_us), 01(zh_cn)|\n|MMM  |month, abbreviated       |Jan(en_us), 01(zh_cn)|\n|MM   |month, 2 digits          |01、11\n|M    |month                    |1, 11|\n|dd   |day in month, 2 digits   |05, 25|\n|d    |day in month             |5, 25|\n|EEEE |day of week              |Monday(en_us), 星期一(zh_cn)|\n|EEE  |day of week, abbreviated |Mon(en_us), 周一(zh_cn)|\n|HH   |hour (0~23), 2 digits    |04, 12, 20|\n|H    |hour (0~23)              |4, 12, 20|\n|mm   |minute, 2 digits         |05, 40|\n|m    |minute                   |5, 40|\n|ss   |second, 2 digits         |06, 55|\n|s    |second                   |6, 55|\n|yyyy年|format                   |2019年, 2020年|\n|H时   |format                   |5时, 21时|\n\n##### Date Format Separator\n\nSupport separator: `|,-/\\._: `.\n\n#### 7\\. DateTimePickerTheme\n\n```dart\n/// DateTimePicker theme.\n///\n/// [backgroundColor] DatePicker's background color.\n/// [cancelTextStyle] Default cancel widget's [TextStyle].\n/// [confirmTextStyle] Default confirm widget's [TextStyle].\n/// [cancel] Custom cancel widget.\n/// [confirm] Custom confirm widget.\n/// [title] Custom title widget. If specify a title widget, the cancel and confirm widgets will not display. Must set [titleHeight] value for custom title widget.\n/// [showTitle] Whether display title widget or not. If set false, the default cancel and confirm widgets will not display, but the custom title widget will display if had specified one custom title widget.\n/// [pickerHeight] The value of DatePicker's height.\n/// [titleHeight] The value of DatePicker's title height.\n/// [itemHeight] The value of DatePicker's column height.\n/// [itemTextStyle] The value of DatePicker's column [TextStyle].\nconst DateTimePickerTheme({\n  this.backgroundColor: DATETIME_PICKER_BACKGROUND_COLOR,\n  this.cancelTextStyle,\n  this.confirmTextStyle,\n  this.cancel,\n  this.confirm,\n  this.title,\n  this.showTitle: DATETIME_PICKER_SHOW_TITLE_DEFAULT,\n  this.pickerHeight: DATETIME_PICKER_HEIGHT,\n  this.titleHeight: DATETIME_PICKER_TITLE_HEIGHT,\n  this.itemHeight: DATETIME_PICKER_ITEM_HEIGHT,\n  this.itemTextStyle: DATETIME_PICKER_ITEM_TEXT_STYLE,\n});\n```\n\n## Example\n\n[Example sources](https://github.com/wuzhendev/flutter-cupertino-date-picker/tree/master/example)\n\n[Example APK](https://raw.githubusercontent.com/wuzhendev/assets/master/flutter-datepicker/flutter_cupertino_date_picker_v1.0.8.apk)\n\n![Example APK Download](https://github.com/wuzhendev/assets/blob/master/flutter-datepicker/date_picker_qrcode_v1.0.8.png?raw=true)\n\n### DatePicker\n\n![Example: DatePicker][1]\n\n![Example: DatePickerWidget][2]\n\n### TimePicker\n\n![Example: TimePicker][3]\n\n![Example: TimePickerWidget][4]\n\n### DateTimePicker\n\n![Example: DateTimePicker][5]\n\n![Example: DateTimePickerWidget][6]\n\n## License\n\n```\nCopyright 2018 wuzhen\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n[1]:https://github.com/wuzhendev/assets/blob/master/flutter-datepicker/flutter_date_picker_14.jpg?raw=true\n[2]:https://github.com/wuzhendev/assets/blob/master/flutter-datepicker/flutter_date_picker_15.jpg?raw=true\n[3]:https://github.com/wuzhendev/assets/blob/master/flutter-datepicker/flutter_date_picker_16.jpg?raw=true\n[4]:https://github.com/wuzhendev/assets/blob/master/flutter-datepicker/flutter_date_picker_17.jpg?raw=true\n[5]:https://github.com/wuzhendev/assets/blob/master/flutter-datepicker/flutter_date_picker_18.jpg?raw=true\n[6]:https://github.com/wuzhendev/assets/blob/master/flutter-datepicker/flutter_date_picker_19.jpg?raw=true\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanwuzh%2Fflutter-cupertino-date-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdylanwuzh%2Fflutter-cupertino-date-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdylanwuzh%2Fflutter-cupertino-date-picker/lists"}