Skip to content

vicpon/ionic-timepicker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Introduction:

This is a ionic-timepicker bower component which can be used with any Ionic framework's application.

View Demo

##Prerequisites.

  1. node.js, bower and gulp.

##How to use:

  1. In your project repository install the ionic time picker using bower

    bower install ionic-timepicker --save-dev

  2. Then you can see the following directory structure see in your project folder

Directory Structure

Give the path of style.css, templates.js and ionic-timepicker.js in your index.html file.

<link href="lib/ionic-timepicker/dist/style.css" rel="stylesheet">

<!-- path to ionic/angularjs js -->
<script src="lib/ionic-timepicker/dist/templates.js"></script>
<script src="lib/ionic-timepicker/dist/ionic-timepicker.js"></script>
  1. In your application module inject the dependency ionic-timepicker, in order to work with the ionic time picker

    angular.module('modulename', ['ionic', 'ionic-timepicker']){

    }

  2. Use the below format in your template's corresponding controller

    $scope.slots = [ {epochTime: 12600, step: 15, format: 12}, {epochTime: 54900, step: 1, format: 24} ];

  3. Then use the below format in your template / html file

    {{slots[0].epochTime}}

a) ionic-time-picker is the directive, to which we can pass required vales.

b) etime takes epoch time.

c) format indicates 12 hour or 24 hour format. It can take two values, 12 or 24.

d) step indicates minute increment. It can take two values, 1 or 15.

Tested with angular#1.3.6 and ionic#1.0.0-beta.14.

##Versions:

1) v0.2.0

The whole time picker functionality has been implemented, and can be installed with

bower install ionic-timepicker

##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

About

timepicker for ionic framework applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 82.8%
  • HTML 15.5%
  • CSS 1.7%