dart_calendar 0.0.2
dart_calendar: ^0.0.2 copied to clipboard

Customizable calendar module for dart. It comes handy when creating Dart user interfaces either for web or mobile. Month calendar, Year calendar and custom calendar(specified range of dates) are inclu

calendar.dart #

Port for Python's calendar.py to Dart

Installation #

Add dependancies #

dependencies:
  dart_calendar: 0.0.x  #latest version 

Then #

pub get

Usage #

import 'package:calendar/calendar.dart';


void main() {
  // Sunday first calendar 
  final calendar = new Calendar(
    weekStartDay: 7 // Sunday as start of week
  );
  
  // Monday First Calendar
  final mondayFirstCalendar = new Calendar(
    weekStartDay: 1
  );
  
  // Calendar Month
  // Calendar for January, 2019
  print(calendar.monthDatesCalendar(2019, 1));
  
  // Calendar Year
  // Calendar for Year 1
  print(calendar.yearDatesCalendar(1));
  
  


  // Custom Calendar ranging from given start and end dates
  final now = DateTime.now();
  final future = now.add(Duration(days: 75));
  
  print(calendar.customDatesCalendar(now, future));
}


Inspired by #

calendar.js https://github.com/ramalho/calendar.js/

1
likes
80
pub points
24%
popularity

Publisher

Unknown

Customizable calendar module for dart. It comes handy when creating Dart user interfaces either for web or mobile. Month calendar, Year calendar and custom calendar(specified range of dates) are included with an option of selection first week day in the calendar.

Repository (GitHub)
View/report issues

Documentation

API reference

More

Packages that depend on dart_calendar