dart_calendar 0.0.2 copy "dart_calendar: ^0.0.2" to clipboard
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
20
pub points
0%
popularity

Publisher

unverified uploader

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

More

Packages that depend on dart_calendar