ionic-time-setter
v1.0.2
Published
Ionic Time Setter
Maintainers
Readme
Ionic Time Setter
A time selection picker widget for Ionic Framework (v1).
How to use
- Install it:
$ bower install ionic-time-setter --save- Add the js to your html:
<script src="lib/ionic-monthpicker/dist/ionic-time-setter.min.js"></script>- Import in your controller:
angular.module('app', ['ionic', 'ionic-time-setter'])
.controller(function( TimeSetter ) {
TimeSetter.show({
onSet: function(hour, minute) {
// Do something with the values.
// Hour is 24-hour time, 0-23.
}
});
});Available options:
| Key | Type | Default | Description | | ---- | ---- | ------ | ---- | |startHour | int | 0 | The default starting hour, defaults to midnight, must be in 24-hour time (0-23) | |startMinute | int | 0 | The default starting minutes, defaults to 0 | |cancelText | string | "Cancel" | Cancel button text | |cancelClass | string | "button-outline button-dark" | Class(es) to apply to the cancel button | |setText | string | "Set Time" | Set button text | |setClass | string | "button-outline button-dark" | Class(es) to apply to the set button | |onSet | function | none | Function to call when the "Set" button is pressed. It takes two arguments: hour and minutes |
