पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

GitHub रिपॉज़िटरीajbaptist/CalenderPicker

कैलेंडर पिकर

ajbaptist/CalenderPicker open-source repository details.

कैलेंडर पिकर प्रोजेक्ट कवर
स्टार
4
फ़ोर्क
6
अंतिम पुश (UTC)
11 मई 2026
प्रोजेक्ट स्थिति
सक्रिय

मूल README

यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।

CalendarPicker

pub package License Flutter

A modern, customizable Flutter calendar picker with horizontal timeline, single/multi-date selection, date ranges, and extensive customization options for 2026 Flutter standards.

✨ Features

  • Horizontal Timeline Calendar - Smooth horizontal scrolling calendar
  • Multiple Selection Modes - Single, multiple, and range date selection
  • Date Restrictions - Min/Max dates, disabled dates, blackout dates
  • Visual Enhancements - Today highlighting, weekend highlighting
  • Infinite Scrolling - Optional infinite horizontal scrolling
  • Swipe Navigation - Touch-friendly navigation
  • Custom First Day of Week - Configurable week start
  • Full Customization - Colors, typography, spacing, decorations
  • RTL Support - Right-to-left language support
  • Full Locale Support - Internationalization ready
  • Accessibility - Screen reader support, keyboard navigation
  • Material 3 Support - Modern design system integration
  • Dark Mode - Built-in dark theme support
  • Performance Optimized - Smooth scrolling, efficient rendering

📸 Screenshots


Single Date Selection

Multiple Date Selection

Date Range Selection

Custom Styling

🚀 Quick Start

Installation

Add to your pubspec.yaml:

dependencies:
  calender_picker: ^3.0.0
Basic Usage
import 'package:calender_picker/calender_picker.dart';

CalendarPicker(
  selectionMode: CalendarSelectionMode.single,
  onDateSelected: (date) {
    print('Selected: $date');
  },
)

📖 Usage Examples

Single Date Selection
CalendarPicker(
  selectionMode: CalendarSelectionMode.single,
  initialSelection: CalendarSelection.single(DateTime.now()),
  config: const CalendarConfig(
    locale: 'en_US',
    highlightToday: true,
    highlightWeekends: true,
  ),
  onDateSelected: (date) {
    print('Selected date: $date');
  },
)
Multiple Date Selection
CalendarPicker(
  selectionMode: CalendarSelectionMode.multiple,
  config: const CalendarConfig(
    activeDates: [DateTime(2024, 1, 15), DateTime(2024, 1, 20)],
  ),
  onDatesSelected: (dates) {
    print('Selected dates: $dates');
  },
)
Date Range Selection
CalendarPicker(
  selectionMode: CalendarSelectionMode.range,
  config: const CalendarConfig(
    minDate: DateTime(2024, 1, 1),
    maxDate: DateTime(2024, 12, 31),
  ),
  onRangeSelected: (start, end) {
    if (start != null && end != null) {
      print('Selected range: $start to $end');
    }
  },
)
Custom Styling
CalendarPicker(
  style: CalendarStyle(
    selectedColor: Colors.blue,
    todayColor: Colors.orange,
    weekendColor: Colors.red.shade100,
    selectedTextStyle: const TextStyle(
      color: Colors.white,
      fontWeight: FontWeight.bold,
    ),
  ),
  onDateSelected: (date) {
    // Handle selection
  },
)
Dark Mode
CalendarPicker(
  style: CalendarStyle.dark(),
  // ... other properties
)
Material 3
CalendarPicker(
  style: CalendarStyle.material3(),
  // ... other properties
)
Using Controller
class MyWidget extends StatefulWidget {
  @override
  _MyWidgetState createState() => _MyWidgetState();
}

class _MyWidgetState extends State<MyWidget> {
  final CalendarController _controller = CalendarController();

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        CalendarPicker(
          controller: _controller,
          selectionMode: CalendarSelectionMode.multiple,
        ),
        ElevatedButton(
          onPressed: () {
            _controller.clearSelection();
          },
          child: const Text('Clear Selection'),
        ),
      ],
    );
  }

  @override
  void dispose() {
    _controller.dispose();
    super.dispose();
  }
}

🎨 Customization

CalendarConfig
CalendarConfig(
  startDate: DateTime.now(),
  minDate: DateTime(2024, 1, 1),
  maxDate: DateTime(2024, 12, 31),
  disabledDates: [DateTime(2024, 1, 15)],
  activeDates: [DateTime(2024, 1, 20)],
  firstDayOfWeek: 1, // Monday
  locale: 'en_US',
  enableInfiniteScroll: true,
  daysCount: 365,
  highlightToday: true,
  highlightWeekends: true,
  enableSwipeNavigation: true,
  showMonthHeaders: true,
  height: 80,
  itemWidth: 60,
  itemSpacing: 4,
)
CalendarStyle
CalendarStyle(
  // Colors
  backgroundColor: Colors.white,
  selectedColor: Colors.blue,
  todayColor: Colors.orange,
  weekendColor: Colors.red.shade100,
  disabledColor: Colors.grey.shade300,

  // Text styles
  dayTextStyle: const TextStyle(fontSize: 11, fontWeight: FontWeight.w500),
  dateTextStyle: const TextStyle(fontSize: 24, fontSize: FontWeight.w600),
  monthTextStyle: const TextStyle(fontSize: 11, fontWeight: FontWeight.w500),

  // Decorations
  selectedDecoration: BoxDecoration(
    color: Colors.blue,
    borderRadius: BorderRadius.circular(25),
  ),

  // Spacing
  itemPadding: const EdgeInsets.all(8),
  itemBorderRadius: 25,
)

🔧 API Reference

CalendarPicker
Property Type Description
selectionMode CalendarSelectionMode Selection mode (single/multiple/range)
initialSelection CalendarSelection? Initial selection state
config CalendarConfig Calendar configuration
style CalendarStyle? Visual styling
controller CalendarController? Optional controller
onDateSelected ValueChanged<DateTime>? Single date selection callback
onDatesSelected ValueChanged<List<DateTime>>? Multiple dates selection callback
onRangeSelected Function(DateTime?, DateTime?)? Range selection callback
onMonthChanged ValueChanged<DateTime>? Month change callback
onDisabledDateTap ValueChanged<DateTime>? Disabled date tap callback
CalendarController
Method Description
selectDate(DateTime) Select a single date
toggleDate(DateTime) Toggle date in multi-selection
selectDates(List<DateTime>) Set multiple dates
selectRange(DateTime?, DateTime?) Set date range
clearSelection() Clear all selections
dispose() Dispose controller

🌍 Localization

The package supports full internationalization:

CalendarPicker(
  config: const CalendarConfig(
    locale: 'es_ES', // Spanish
  ),
)

Supported locales depend on the intl package. Make sure to initialize date formatting:

import 'package:intl/date_symbol_data_local.dart';

void main() async {
  await initializeDateFormatting('es_ES', null);
  runApp(MyApp());
}

♿ Accessibility

The calendar includes comprehensive accessibility features:

  • Screen reader support with descriptive labels
  • Keyboard navigation
  • High contrast support
  • Semantic markup
  • Focus management

🧪 Testing

Run tests:

flutter test

Run example app:

cd example
flutter run

📋 Migration Guide

From v2.x to v3.0
  1. Update pubspec.yaml:

    dependencies:
      calender_picker: ^3.0.0
    
  2. Update imports:

    // Old
    import 'package:calender_picker/calender_picker.dart';
    CalenderPicker(...)
    
    // New
    import 'package:calender_picker/calender_picker.dart';
    CalendarPicker(...)
    
  3. Update constructor:

    // Old
    CalenderPicker(
      DateTime.now(),
      enableMultiSelection: true,
      onDateChange: (date) => print(date),
    )
    
    // New
    CalendarPicker(
      selectionMode: CalendarSelectionMode.multiple,
      onDatesSelected: (dates) => print(dates),
    )
    
  4. Update styling:

    // Old
    CalenderPicker(
      selectionColor: Colors.blue,
      selectedTextColor: Colors.white,
    )
    
    // New
    CalendarPicker(
      style: const CalendarStyle(
        selectedColor: Colors.blue,
        selectedDayTextStyle: TextStyle(color: Colors.white),
        selectedDateTextStyle: TextStyle(color: Colors.white),
      ),
    )
    

📋 Version History

Version Date Highlights
3.0.2 2026-05-11 Version bump to 3.0.2 (3.0.1 already published); enhanced README version history with detailed entries for all releases
3.0.1 2026-05-11 Fixed screenshot references to use correct .jpg files; switched images to GitHub raw URLs for pub.dev display; updated GitHub URLs to correct repository
3.0.0 2026-05-11 Major rewrite: Modern architecture, multiple selection modes (single/multi/range), Material 3, dark mode, accessibility, RTL support, controller pattern, performance optimizations
2.0.2 2023-12-21 Dependencies upgraded
2.0.1 2023-03-24 Screenshots added
2.0.0 2023-03-24 Fixed date scroll issue, upgraded to Flutter 3.0
1.0.7 2021-11-29 Date format fixes
1.0.6 2021-11-27 Date format fixes
1.0.5 2021-11-27 Day format issues fixed
1.0.4 2021-11-27 State management problems fixed
1.0.3 2021-11-27 Removed debug print statements
1.0.2 2021-10-13 Added multi-date selection listener function
1.0.1 2021-10-08 Screenshots added
1.0.0 2021-10-08 Alignment problems fixed
0.0.4 2021-10-07 Screenshots added
0.0.3 2021-10-07 Initial screenshots added
0.0.2 2021-10-06 Basic functionality, updated Readme, multi-select date option, removed time from selected date
0.0.1 2021-10-05 Initial release

🤝 Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

📄 License

MIT License - see LICENSE file.

🙏 Acknowledgments

  • Built with Flutter
  • Uses intl for internationalization
  • Inspired by modern calendar interfaces

Made with ❤️ for the Flutter community

JOHN BAPTIST GitHub avatar
GitHub लेखक

JOHN BAPTIST ↗

भाषाएँDartHTMLSwiftKotlinObjective-C

इस रिपॉज़िटरी के पैकेज

उपयोग की गई निर्भरताएँ

निर्भरता सूची 5 आइटम

  • flutter{"sdk":"flutter"}
  • intl^0.19.0
  • collection^1.18.0
  • flutter_testडेवलपमेंट{"sdk":"flutter"}
  • flutter_lintsडेवलपमेंट^4.0.0

अपने प्रोजेक्ट के लिए रिपॉज़िटरी कैसे चुनें?

उपयोग के अनुसार छाँटें, गतिविधि की तुलना करें और अपनाने से पहले मूल प्रोजेक्ट की आवश्यकताएँ जाँचें।

  1. नाम, लेखक या विवरण से खोजें और तकनीकी विषय से परिणाम सीमित करें।
  2. स्टार, फ़ोर्क और हाल के पुश की तुलना करें। स्टार रुचि दर्शाते हैं, गुणवत्ता की गारंटी नहीं।
  3. उपयोग से पहले GitHub पर README, लाइसेंस और Issues जाँचें।

स्रोत और रखरखाव

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗