{"id":18352411,"url":"https://github.com/cleveroad/cr_calendar","last_synced_at":"2025-04-06T11:32:52.103Z","repository":{"id":42430703,"uuid":"355193560","full_name":"Cleveroad/cr_calendar","owner":"Cleveroad","description":"Highly customizable, feature-packed calendar widget for Flutter.","archived":false,"fork":false,"pushed_at":"2023-08-01T12:19:33.000Z","size":1495,"stargazers_count":27,"open_issues_count":7,"forks_count":24,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-04-23T10:23:28.161Z","etag":null,"topics":["calendar","dart","flutter","flutter-examples","flutter-plugin","flutter-plugins","flutter-ui","flutter-widget","widget"],"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/Cleveroad.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}},"created_at":"2021-04-06T13:12:25.000Z","updated_at":"2024-03-29T13:39:38.000Z","dependencies_parsed_at":"2024-01-13T03:27:54.460Z","dependency_job_id":"7a00b71b-c567-4ed4-9f79-fe8814c65857","html_url":"https://github.com/Cleveroad/cr_calendar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2Fcr_calendar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2Fcr_calendar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2Fcr_calendar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cleveroad%2Fcr_calendar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cleveroad","download_url":"https://codeload.github.com/Cleveroad/cr_calendar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478152,"owners_count":20945258,"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":["calendar","dart","flutter","flutter-examples","flutter-plugin","flutter-plugins","flutter-ui","flutter-widget","widget"],"created_at":"2024-11-05T21:35:52.720Z","updated_at":"2025-04-06T11:32:50.229Z","avatar_url":"https://github.com/Cleveroad.png","language":"Dart","readme":"# CrCalendar\n\nCustomizable Flutter calendar inspired by Google Calendar app.\n\n##### Features:\n- CrCalendar widget for displaying horizontally scrollable month view, with events lines over days.\n- date selection dialog (uses CrCalendar widget in range selection mode) with customization of buttons, texts and look of the CrCalendar widget.\n\n##### Screenshots of [example app](https://github.com/Cleveroad/cr_calendar/tree/main/example):\n\u003cimg src=\"https://raw.githubusercontent.com/Cleveroad/cr_calendar/main/screenshots/screenshot-1.png\" height=\"500\"\u003e  \u003cimg src=\"https://raw.githubusercontent.com/Cleveroad/cr_calendar/main/screenshots/screenshot-2.png\" height=\"500\"\u003e  \u003cimg src=\"https://raw.githubusercontent.com/Cleveroad/cr_calendar/main/screenshots/screenshot-3.png\" height=\"500\"\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/Cleveroad/cr_calendar/main/screenshots/screenshot-4.png\" height=\"500\"\u003e  \u003cimg src=\"https://raw.githubusercontent.com/Cleveroad/cr_calendar/main/screenshots/screenshot-5.png\" height=\"500\"\u003e  \u003cimg src=\"https://raw.githubusercontent.com/Cleveroad/cr_calendar/main/screenshots/screenshot-6.png\" height=\"500\"\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/Cleveroad/cr_calendar/main/screenshots/screenshot-7.png\" height=\"322\"\u003e\n\n### Installation\nAdd `cr_calendar` as a dependency in pubspec.yaml.\n\nThen import it to your project:\n\n`import 'package:cr_calendar/src/cr_calendar.dart';`\n\n---\n\n### Usage of CrCalendar\n##### CrCalendar  parameters:\n|Type|Name|Description|Default value|\n|:-------:|:-------:|:---------:|:-----------:|\n|CrCalendarController|controller|Calendar controller|-|\n|DateTime|initialDate|Initial date to be showed when calendar created|-|\n|OnTapCallback|onDayClicked|Callback fired when calendar day is tapped in calendar with TouchMode.singleTap touch mode.|-|\n|WeekDays|firstDayOfWeek|Sets day from which week begins|WeekDays.sunday|\n|WeekDaysBuilder|weekDaysBuilder|Builder for customization week days row at top of the calendar widget.|-|\n|DayItemBuilder|dayItemBuilder|Builder for customization of days cells.|-|\n|bool|forceSixWeek|Force calendar to display sixth row in month view even if this week is not in current month.|false|\n|Color|backgroundColor|Background color of the calendar|-|\n|int|maxEventLines|Number of events widgets to be displayed over day item cell|4|\n|EventBuilder|eventBuilder|Event widget builder|-|\n|TouchMode|touchMode|Touch mode of calendar.|-|\n|double|eventsTopPadding|Padding over events widgets to for correction of their alignment.|-|\n|OnRangeSelectedCallback|onRangeSelected|Callback for receiving selected range when calendar is used as date picker.|-|\n|int|onSwipeCallbackDebounceMs|Time in milliseconds for debounce CrCalendarController onSwipe callback.|-|\n|DateTime|minDate|Earliest allowable date.|-|\n|DateTime|maxDate|Latest allowable date.|-|\n\n#### Base usage:\n```dart\nclass MyApp extends StatefulWidget {\n  @override\n  _MyAppState createState() =\u003e _MyAppState();\n}\n\nclass _MyAppState extends State\u003cMyApp\u003e {\n  CrCalendarController _controller = CrCalendarController();\n\n  @override\n  Widget build(BuildContext context) {\n    return MaterialApp(\n      home: Scaffold(\n        body: CrCalendar(\n          initialDate: DateTime.now(),\n          controller: _controller,\n        ),\n      ),\n    );\n  }\n}\n```\n\nNote: avoid using setState calls frequently on the page where the CrCalendar widget is used to improve performance.\n\n### Usage of CrCalendar date picker dialog\n##### DatePickerProperties parameters:\n|Type|Name|Description|Default value|\n|:-------:|:-------:|:---------:|:-----------:|\n|Color|backgroundColor|Background color for date picker dialog and year selection widget.|Colors.white|\n|DateTime|initialPickerDate|Initial date to be opened on dialog creation.|-|\n|EdgeInsets|padding|Picker dialog padding.|EdgeInsets.all(8)|\n|DayItemBuilder|dayItemBuilder|Builder for day item in dialog.|-|\n|TouchMode|pickerMode|Picker selection mode.|-|\n|WeekDaysBuilder|weekDaysBuilder|Builder for row of days over month view.|-|\n|DateTitleBuilder|pickerTitleBuilder|Title builder for widget on top of picker dialog.|-|\n|Alignment|pickerTitleAlignInLandscape|Alignment of picker title in landscape mode.|Alignment.centerLeft|\n|Widget|backButton|Back button for picker control bar.|-|\n|Widget|forwardButton|Forward button for picker control bar.|-|\n|DateTitleBuilder|controlBarTitleBuilder|Builder for control bar title showed between backButton and forwardButton.|-|\n|bool|showControlBar|Option for hiding control bar.|true|\n|YearPickerItemBuilder|yearPickerItemBuilder|Builder for confirm selection button.|-|\n|PickerButtonBuilder|okButtonBuilder|Builder for confirm selection button.|-|\n|PickerButtonBuilder|cancelButtonBuilder|Builder for cancel button.|-|\n|bool|forceSixWeek|Force showing six week rows in month view.|false|\n|WeekDays|firstWeekDay|First day of date picker calendar.|WeekDays.sunday|\n|DateTime|minDate|Earliest allowable date.|-|\n|DateTime|maxDate|Latest allowable date.|-|\n|LandscapeDaysResizeMode|landscapeDaysResizeMode|LandscapeDaysResizeMode.adaptive - days cells will change their height according to parent height LandscapeDaysResizeMode.scrollable - days cells will change their height according to parent height as long as it is larger than the cells width. The month scrolls if there is not enough space|LandscapeDaysResizeMode.adaptive|\n\n#### Base usage:\n```dart\n  /// Show calendar in pop up dialog for selecting date range for calendar event.\n  void _showDatePicker(BuildContext context) {\n    showCrDatePicker(\n      context,\n      properties: DatePickerProperties(\n        firstWeekDay: WeekDays.monday,\n        okButtonBuilder: (onPress) =\u003e\n            ElevatedButton(child: const Text('OK'), onPressed: onPress),\n        cancelButtonBuilder: (onPress) =\u003e\n            OutlinedButton(child: const Text('CANCEL'), onPressed: onPress),\n        initialPickerDate: DateTime.now(),\n      ),\n    );\n  }\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleveroad%2Fcr_calendar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcleveroad%2Fcr_calendar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcleveroad%2Fcr_calendar/lists"}