##Introduction:
To install ionic-timepicker
from this fork, utilize bower install ionic-timepicker-dfandrade
.
ORIGINAL: This is a ionic-timepicker
bower component which can be used with any Ionic framework's application.
##Prerequisites.
- node.js, bower and gulp.
##How to use:
-
In your project repository install the ionic time picker using bower
bower install ionic-timepicker-dfandrade --save-dev
-
Then you can see the following directory structure see in your project folder
Give the path of style.css, templates.js and ionic-timepicker.js
in your index.html
file.
<link href="lib/ionic-timepicker-dfandrade/dist/style.css" rel="stylesheet">
<!-- path to ionic/angularjs js -->
<script src="lib/ionic-timepicker-dfandrade/dist/templates.js"></script>
<script src="lib/ionic-timepicker-dfandrade/dist/ionic-timepicker.js"></script>
- In your application module inject the dependency
ionic-timepicker
, in order to work with the ionic time picker
angular.module('modulename', ['ionic', 'ionic-timepicker']){
}
- TimePicker options
time: init time **Required
step: minutes step 1-59 (Default: 10)
format: clock format 12 or 24 (Default: 12)
popup-title: popup title (Default: 12-Hour Format or 24-Hour Format)
btn-close-text: button close label (Default: 'Close')
btn-set-text: button set label (Default: 'Set')
btn-close-type: button close design (Default: 'button-default')
btn-set-type: button set design (Default: 'button-positive')
- Then use the below format in your template / html file
<ionic-timepicker time="currentDate" step="15" format="24" popup-title="{{'POPUP.TITLE' | translate}}" btn-close-text="{{'btn.cancel' | translate}}" btn-set-text="{{'BUTTON.SET' | translate}}" btn-set-text="{{'BUTTON.CLOSE' | translate}}" btn-close-type="button-assertive" btn-set-type="button-positive">
<button class="button button-outline icon-left ion-android-time button-positive"> {{ currentDate | date: 'hh:mm a'}} </button>
</ionic-timepicker>
##Versions:
The whole time picker functionality has been implemented, and can be installed with
bower install ionic-timepicker --save
Directive name has been modified.
If the minutes and hours are less than 10, then 0 will be prepended to the value of minutes/hours.
- Attributes have been modified.
- Option for popup title and buttons label.
- Option for button design (color, type).
- Minutes increment/decrement improved.
- CSS: popup content centralization.
Bug Fix. Time reference being changed without pressing set button.
Fixing ionic version dependency.
##License: MIT
##Contact: gmail : rajeshwar.patlolla@gmail.com
github : https://github.com/rajeshwarpatlolla
twitter : https://twitter.com/rajeshwar_9032
facebook : https://www.facebook.com/rajeshwarpatlolla
paypal : rajeshwar.patlolla@gmail.com
gmail : diones.andrade@gmail.com