1.0.3 • Published 6 years ago

ionic-monthpicker v1.0.3

Weekly downloads
8
License
Apache-2.0
Repository
github
Last release
6 years ago

ionic-monthpicker

Monthpicker for ionic

Example

How to use

1) Install it:

$ bower install ionic-monthpicker --save

2) Add the js to your html:

<script src="lib/ionic-monthpicker/dist/ionic-monthpicker.min.js"></script>

3) Import in your controller:

angular.module('app', ['ionic', 'ionic-monthpicker'])
    .controller(function( MonthPicker ) {
        MonthPicker.init({});
        $scope.buttonTap = function() {
            MonthPicker.show(function(res) {
                console.log(res);
            });
        }
    });

Available options:

KeyTypeDefaulWhy?
minMonthIndexint0Minimim month index
minYearintnew Date().getFullYear()Minimum year
maxMonthIndexintnew Date().getMonth()Maximum month index
maxYearintnew Date().getFullYear()Maximum year
startingYearintmaxYearSet the starting year
monthLabelsarray'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'Month labels to display
titlestring"Select month"Popup title
cancelTextstring"Cancel"Cancel button text
cancelClassstring"button-assertive"Class to apply to the cancel button