GithubHelp home page GithubHelp logo

tdehaeze / calendar-pk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twinssbc/ionic-calendar

1.0 2.0 0.0 224 KB

A calendar directive for Ionic framework

Home Page: http://tdehaeze.github.io/calendar-pk/demo/#/tab/home

License: MIT License

CSS 6.25% JavaScript 80.64% HTML 13.11%
ionic-framework ionic calendar

calendar-pk's Introduction

Ionic-Calendar directive

Ionic calendar directive

Usage

Bower Install: bower install calendar-pk

Load the necessary dependent files:

    <link href="lib/calendar-pk/dist/css/calendar_pk.css" rel="stylesheet">
    <script src="lib/calendar-pk/dist/js/calendar_pk.js"></script>

Add the calendar module as a dependency to your application module:

    var myAppModule = angular.module('MyApp', ['calendar_pk'])

Add the directive in the html page

    <calendar-pk    event-source="eventSource"
                    current-month="currentMonth"></calendar-pk>

Data arguments

  • eventSource : The data source of the calendar, when the eventSource is set, the view will be updated accordingly. eventSource should be an array of Dates.
    • Default value: []

Options arguments

  • formatDay : The format of the date displayed in the month view.

    • Default value: 'dd'
  • formatDayHeader : The format of the header displayed in the month view.

    • Default value: 'EEE'
  • formatMonthTitle : The format of the title displayed in the month view.

    • Default value: 'MMMM yyyy'
  • startingDayMonth : Control month view starting from which day.

    • Default value: 1 (Monday)

Functions arguments

  • monthChanged

    • startTime (DateTime)
    • endTime (DateTime)
    • display (String)
  • timeSelected

    • selectedTime (DateTime)
  • weekSelected

    • monday (DateTime)

Events

  • changeMonth : When receiving this event, the calendar will move the current view to previous or next range.
    • direction (1: Forward -1: Backward)
    $scope.$broadcast('changeMonth', 1);

i18n support

When including the angular locale script, the viewTitle and header of the calendar will be translated to local language automatically.

    <script src="http://code.angularjs.org/1.4.3/i18n/angular-locale_xx.js"></script>

calendar-pk's People

Contributors

do-it-together avatar manduro avatar mmmid avatar twinssbc avatar

Stargazers

 avatar

Watchers

 avatar  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.