aes_calendar

A customizable and lightweight Flutter calendar widget with built-in year–month selector and wheel picker support.

aes_calendar makes it easy to integrate a clean, interactive calendar into your Flutter app with minimal configuration.


✨ Features

  • πŸ“… Interactive calendar UI
  • πŸ—“ Year & Month selector
  • 🎑 Wheel-style date picker
  • 🎯 Date selection callback
  • πŸ”’ Optional maximum date restriction
  • 🧩 Lightweight and easy to integrate

πŸ“¦ Installation

Add the dependency in your pubspec.yaml:

dependencies:
  aes_calendar: ^0.0.1

Then run:

flutter pub get

πŸš€ Basic Usage

Import the package:

import 'package:aes_calendar/aes_calendar.dart';

Use AesCalendar inside your widget:

AesCalendar(
  selectedDate: DateTime.now(),
  endDate: DateTime(2030),
  onDateSelected: (date) {
    print("Selected Date: $date");
  },
)

🧩 Parameters

Parameter Type Required Description
selectedDate DateTime βœ… Yes Initially selected date
endDate DateTime? ❌ No Maximum selectable date
onDateSelected ValueChanged<DateTime> βœ… Yes Callback when date changes

πŸ— Complete Example

import 'package:flutter/material.dart';
import 'package:aes_calendar/aes_calendar.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: CalendarExample(),
    );
  }
}

class CalendarExample extends StatefulWidget {
  const CalendarExample({super.key});

  @override
  State<CalendarExample> createState() => _CalendarExampleState();
}

class _CalendarExampleState extends State<CalendarExample> {
  DateTime selectedDate = DateTime.now();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('Aes Calendar Example')),
      body: Center(
        child: AesCalendar(
          selectedDate: selectedDate,
          endDate: DateTime(2030),
          onDateSelected: (date) {
            setState(() {
              selectedDate = date;
            });
          },
        ),
      ),
    );
  }
}

πŸ“ Example Project

A full working example is available in the /example folder of this package.

To run it locally:

cd example
flutter run

πŸ›  Requirements

  • Flutter SDK >= 3.0.0
  • Dart SDK >= 3.0.0

πŸ“„ License

This project is licensed under the MIT License.


🀝 Contributions

Contributions, issues, and feature requests are welcome.

If you like this package, consider giving it a ⭐ on GitHub.

Libraries

aes_calendar