GithubHelp home page GithubHelp logo

bmb-enterprises / calendarro Goto Github PK

View Code? Open in Web Editor NEW

This project forked from adamstyrc/calendarro

1.0 1.0 0.0 1.16 MB

Calendar widget library for Flutter apps.

License: MIT License

Dart 95.82% Java 1.36% Objective-C 2.82%

calendarro's Introduction

Calendarro

Calendar widget library for Flutter apps. Offers multiple ways to customize the widget.

Getting Started

Installation

Add dependency to your pubspec.yaml:

calendarro: ^1.0.1

Basic use

First, add an import to your code:

import 'package:calendarro/calendarro.dart';

Add a widget to your code:

Calendarro(
  startDate: DateUtils.getFirstDayOfCurrentMonth(),
  endDate: DateUtils.getLastDayOfCurrentMonth()
  )

alt tag

Customization

alt tag

1. Display Mode - If you prefer to operate on multiple rows to see whole month, use:

Calendarro(
  displayMode: DisplayMode.MONTHS,
  ...
  )

2. Selection Mode - If you want to select multiple dates, use:

Calendarro(
  selectionMode: SelectionMode.MULTI,
  ...
  )

3. Weekday Labels - If you want to provide your own row widget for displaying weekday names, use:

Calendarro(
  weekdayLabelsRow: CustomWeekdayLabelsRow()
  ...
  )

you can create your CustomWeekdayLabelsRow by looking at default CalendarroWeekdayLabelsView.

4. Day Tile Builder - If you want to build day tiles your own way, you can use:

Calendarro(
  dayTileBuilder: CustomDayTileBuilder()
  ...
  )

you can create your CustomDayTileBuilder looking upon DefaultDayTileBuilder.

5. Initial selected dates - When you want some dates to be selected from the scratch, use selectedDate (SelectionMode.SINGLE) or selectedDates (SelectionMode.MULTI) arguments:

Calendarro(
  selectedDate: DateTime(2018, 8, 1)
  //or
  selectedDates: [DateTime(2018, 8, 1), DateTime(2018, 8, 8)]
  ...
  )

you can create your CustomDayTileBuilder looking upon DefaultDayTileBuilder.

Selecting date callback

If you want to get a callback when a date tile is clicked, there is onTap param:

Calendarro(
  onTap: (date) {
      //your code
  }
  ...
  )

Advanced usage:

For more advanced usage see: https://github.com/adamstyrc/parking-app

calendarro's People

Contributors

adamstyrc avatar

Stargazers

 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.