Skip to content

prui/ionic-monthpicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ionic-monthpicker

Monthpicker for ionic

Example

How to use

  1. Install it:
$ bower install ionic-monthpicker --save
  1. Add the js to your html:
<script src="lib/ionic-monthpicker/dist/ionic-monthpicker.min.js"></script>
  1. 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:

Key Type Defaul Why?
minMonthIndex int 0 Minimim month index
minYear int new Date().getFullYear() Minimum year
maxMonthIndex int new Date().getMonth() Maximum month index
maxYear int new Date().getFullYear() Maximum year
monthLabels array ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Now', 'Dec'] Month labels to display
title string "Select month" Popup title
cancelText string "Cancel" Cancel button text

About

Monthpicker for ionic

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 87.2%
  • HTML 12.8%