Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/petruisfan/ionic-monthpicker
Monthpicker for ionic
https://github.com/petruisfan/ionic-monthpicker
Last synced: 3 months ago
JSON representation
Monthpicker for ionic
- Host: GitHub
- URL: https://github.com/petruisfan/ionic-monthpicker
- Owner: petruisfan
- License: apache-2.0
- Created: 2016-04-09T08:05:05.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-15T14:13:45.000Z (over 7 years ago)
- Last Synced: 2024-04-15T12:21:21.988Z (10 months ago)
- Language: JavaScript
- Size: 69.3 KB
- Stars: 10
- Watchers: 6
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ionic-monthpicker
Monthpicker for ionic![Example](/screenshots/screenshot.png?raw=true)
## How to use
1) Install it:
```shell
$ bower install ionic-monthpicker --save
```2) Add the js to your html:
```html
```
3) Import in your controller:
```JavaScript
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 |
|startingYear | int | maxYear | Set the starting year |
|monthLabels | array | ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] | Month labels to display |
|title | string | "Select month" | Popup title |
|cancelText | string | "Cancel" | Cancel button text |
|cancelClass | string | "button-assertive" | Class to apply to the cancel button |