{"id":13471471,"url":"https://github.com/MariaMelnik/flutter_date_pickers","last_synced_at":"2025-03-26T13:31:09.491Z","repository":{"id":37405821,"uuid":"178896591","full_name":"MariaMelnik/flutter_date_pickers","owner":"MariaMelnik","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-30T23:24:27.000Z","size":28687,"stargazers_count":200,"open_issues_count":29,"forks_count":126,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-30T02:59:42.935Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"https://pub.dev/packages/flutter_date_pickers","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/MariaMelnik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"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}},"created_at":"2019-04-01T15:50:11.000Z","updated_at":"2024-07-19T07:48:09.000Z","dependencies_parsed_at":"2024-05-31T00:46:52.358Z","dependency_job_id":"0b4b8f33-569d-484b-9945-e859f69f63a7","html_url":"https://github.com/MariaMelnik/flutter_date_pickers","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MariaMelnik%2Fflutter_date_pickers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MariaMelnik%2Fflutter_date_pickers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MariaMelnik%2Fflutter_date_pickers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MariaMelnik%2Fflutter_date_pickers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MariaMelnik","download_url":"https://codeload.github.com/MariaMelnik/flutter_date_pickers/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245662819,"owners_count":20652086,"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","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":["hacktoberfest"],"created_at":"2024-07-31T16:00:45.476Z","updated_at":"2025-03-26T13:31:08.376Z","avatar_url":"https://github.com/MariaMelnik.png","language":"Dart","funding_links":[],"categories":["Dart","Packages"],"sub_categories":[],"readme":"# flutter_date_pickers  \n  \n[![Actions Status](https://github.com/MariaMelnik/flutter_date_pickers/workflows/Test/badge.svg)](https://github.com/MariaMelnik/flutter_date_pickers/actions)\n[![Pub](https://img.shields.io/pub/v/flutter_date_pickers.svg)](https://pub.dev/packages/flutter_date_pickers)\n[![Likes](https://img.shields.io/badge/dynamic/json?color=blue\u0026label=likes\u0026query=likes\u0026url=http://www.pubscore.gq/likes?package=flutter_date_pickers\u0026style=flat-square\u0026cacheSeconds=90000)](https://pub.dev/packages/flutter_date_pickers)\n[![Health](https://img.shields.io/badge/dynamic/json?color=blue\u0026label=health\u0026query=pub_points\u0026url=http://www.pubscore.gq/pub-points?package=flutter_date_pickers\u0026style=flat-square\u0026cacheSeconds=90000)](https://pub.dev/packages/flutter_date_pickers/score)\n[![Code size](https://img.shields.io/github/languages/code-size/MariaMelnik/flutter_date_pickers?logo=github\u0026logoColor=white)](https://github.com/MariaMelnik/flutter_date_pickers)\n[![License: MIT](https://img.shields.io/badge/license-MIT-purple.svg)](https://opensource.org/licenses/MIT)\n[![GitHub stars](https://img.shields.io/github/stars/MariaMelnik/flutter_date_pickers?style=social)](https://github.com/MariaMelnik/flutter_date_pickers/)\n\u003c!--[![Coverage](https://codecov.io/gh/MariaMelnik/flutter_date_pickers/branch/master/graph/badge.svg)](https://codecov.io/gh/MariaMelnik/flutter_date_pickers)\n[![effective_dart](https://img.shields.io/badge/style-effective_dart-40c4ff.svg)](https://github.com/tenhobi/effective_dart)--\u003e\n  \n  \nAllows to use date pickers without dialog.\nProvides some customizable styles for date pickers.\n\nA set of date pickers:\n* `DayPicker` for one day\n* `WeekPicker` for whole week\n* `RangePicker` for random range\n* `MonthPicker` for month\n* `YearPicker` for year\n\n![](demoDatePickers2.gif)\n\n## How to style date picker\nEvery date picker constructor take a style object as a parameter (if no styles passed - defaults will be used).\n\nFor single value pickers (DayPicker, MonthPicker) it is DatePickerStyles object;\n\nFor range pickers (WeekPicker, RangePickers) it is DatePickerRangeStyles object;\n\nCustomizable styles:\nfor all date pickers\n\n| Property | Description |\n|---|---|\n| TextStyle displayedPeriodTitle | title of the date picker |\n| TextStyle currentDateStyle | style for current date |\n| TextStyle disabledDateStyle | style for disabled dates (before first and after last date user can pick) |\n| TextStyle selectedDateStyle | style for selected date |\n| BoxDecoration selectedSingleDateDecoration | decoration for selected date in case single value is selected |\n| TextStyle defaultDateTextStyle | style for date which is neither current nor disabled nor selected |\n| DayHeaderStyle dayHeaderStyle | style for all weekday headers. For more control under weekday headers styles use dayHeaderStyleBuilder |\n| DayHeaderStyleBuilder dayHeaderStyleBuilder | builder to customize weekday header's style |\n| DayHeaderTitleBuilder dayHeaderTitleBuilder | builder to customize weekday header's title |\n\nonly for range date pickers (WeekPicker, RangePicker)\n\n| Property | Description |\n|---|---|\n| BoxDecoration selectedPeriodStartDecoration | decoration for the first date of the selected range |\n| BoxDecoration selectedPeriodLastDecoration | decoration for the first date of the selected range |\n| BoxDecoration selectedPeriodMiddleDecoration | Decoration for the date of the selected range which is not first date and not end date of this range |\n\n## How to make some dates not selectable date picker\nBy default only dates before `firstDate` and after `lastDate` are not selectable. But you can set custom disabled days.\n`DayPicker`, `WeekPicker` and `RangePicker` take a `SelectableDayPredicate selectableDayPredicate`\nwhere you can specify function which returns if some date is disabled or not.\n\nIf some date is disabled for selection it gets `disabledDateStyle`.\n\nIf selected range or week pretends to include such disabled date `UnselectablePeriodException` occurs.\nTo handle it - pass `onSelectionError` callback to date picker.\n\n## How to make special decorations for some dates\nBy default cells are decorated with `datePickerStyles` slyles (or default if no styles was passed to date picker).\nIf you need special decoration for some days use `eventDecorationBuilder`.\nCurrently only for `DayPicker`, `WeekPicker` and `RangePicker`.\n\n- If date is not selected basic styles will be merged with styles from `eventDecorationBuilder`.\n- If date is current date styles from `eventDecorationBuilder` win (if there are).\n- Otherwise basic styles (`datePickerStyles`) win.\n\n## What time I will get after selection?\nIf one day selected:\n you will get start of the day (00:00:00).\n\nIf range/week selected:\n for start you will get start of the day (00:00:00) by default.\n for end you will get end of the day (23:59:59.999) by default.\n\nIf month selected:\n  you will get start (00:00:00) of the 1 day of month by default.\n  If selected month same as month of the `firstDate` - you will get `firstDate`.\n\n## Usage\n\n```dart\n// Create week date picker with passed parameters\nWidget buildWeekDatePicker (DateTime selectedDate, DateTime firstAllowedDate, DateTime lastAllowedDate, ValueChanged\u003cDatePeriod\u003e onNewSelected) {\n\n // add some colors to default settings\n    DatePickerRangeStyles styles = DatePickerRangeStyles(\n      selectedPeriodLastDecoration: BoxDecoration(\n          color: Colors.red,\n          borderRadius: BorderRadiusDirectional.only(\n              topEnd: Radius.circular(10.0),\n              bottomEnd: Radius.circular(10.0))),\n      selectedPeriodStartDecoration: BoxDecoration(\n        color: Colors.green,\n        borderRadius: BorderRadiusDirectional.only(\n            topStart: Radius.circular(10.0), bottomStart: Radius.circular(10.0)),\n      ),\n      selectedPeriodMiddleDecoration: BoxDecoration(\n          color: Colors.yellow, shape: BoxShape.rectangle),\n    );\n    \n  return WeekPicker(\n      selectedDate: selectedDate,\n      onChanged: onNewSelected,\n      firstDate: firstAllowedDate,\n      lastDate: lastAllowedDate,\n      datePickerStyles: styles\n  );\n}\n```\n\n## Example app\nPlease checkout [example](https://github.com/MariaMelnik/flutter_date_pickers/tree/master/example).\n\nFor help getting started with Flutter, view our\n[online documentation](https://flutter.io/docs), which offers tutorials,\nsamples, guidance on mobile development, and a full API reference.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMariaMelnik%2Fflutter_date_pickers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMariaMelnik%2Fflutter_date_pickers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMariaMelnik%2Fflutter_date_pickers/lists"}