flutter_calendar_kit 0.0.1%2B1

SDKflutter
Platformandroidioswindowslinuxmacosweb

A highly customizable calendar widget for Flutter applications.

GitHub code size All Contributors Pub

Flutter Calendar Kit

A Flutter package that provides a highly customizable calendar widget for picking dates. This widget supports various customization options including single and multi-date selection, blocked and booked date handling, and flexible date validation.

Description

flutter_calendar_kit is designed to simplify the process of integrating a customizable calendar into your Flutter application. Whether you need a simple date picker or a complex booking system, this package offers the flexibility to meet your needs.

Sample Code

Here's a basic example demonstrating how to use the flutter_calendar_kit package:

CustomCalendar(
  onDatesSelected: (dates) {
    print('Selected dates: $dates');
  },
  initialBlockedDates: [DateTime(2023, 10, 15), DateTime(2023, 10, 16)],
  initialBookedDates: [DateTime(2023, 10, 20), DateTime(2023, 10, 21)],
  primaryColor: Colors.green,
  blockedColor: Colors.red.withOpacity(0.5),
  bookedColor: Colors.orange,
  allowBlockedSelection: true,
  showAdjacentMonths: true,
)

Features

FeatureDescription
Single/Multi-date SelectionAllow users to select one or multiple dates
Blocked Date HandlingHighlight and optionally allow selection of blocked dates
Booked Date HighlightingVisually distinguish booked dates
Dynamic Date ValidationImplement custom logic for date selection (e.g., restrict past dates)
Extensive CustomizationCustomize colors, text styles, and more to match your app's design
Adjacent Month DisplayOption to show or hide dates from adjacent months

Properties

NameTypeDescription
onDatesSelectedValueChanged<List>Callback for when dates are selected
initialBlockedDatesListList of initially blocked dates
initialBookedDatesListList of initially booked dates
dateValidationCallbackbool Function(DateTime)Custom logic for date validation
primaryColorColorMain color used for selection and highlighting
blockedColorColorColor used for blocked dates
bookedColorColorColor used for booked dates
allowBlockedSelectionboolWhether to allow selection of blocked dates
showAdjacentMonthsboolWhether to show dates from adjacent months
fontFamilyStringCustom font family for the calendar text
weekdayTextStyleTextStyleCustom text style for weekday headers

Getting Started

  1. Add the dependency to your pubspec.yaml file:
dependencies:
  flutter_calendar_kit: ^0.1.0
  1. Install the package:
flutter pub get
  1. Import the package in your Dart code:
import 'package:flutter_calendar_kit/flutter_calendar_kit.dart';
  1. Use the CustomCalendar widget in your app:
CustomCalendar(
  onDatesSelected: (dates) {
    // Handle selected dates
  },
  // Add other customization options as needed
)

Contributions

Contributions of any kind are more than welcome! Feel free to fork and improve flutter_calendar_kit in any way you want, make a pull request, or open an issue.

Contributors

Jignesh Shakya
Jignesh Shakya

🚇 ⚠️ 💻 📆

Getting Involved

We appreciate your interest in getting involved! You're a superstar ⭐ and we ❤️ you!

Reporting Bugs and Issues

Use the configured Github issue report template when reporting an issue. Please provide clear details about your observations and expectations to help us troubleshoot effectively.

Discussions and Ideas

We're open to discussions and ideas. Post your questions on StackOverflow with the tag flutter_calendar_kit.


Visitors Count

Loading