Giter Club home page Giter Club logo

time-duration-picker's Introduction

Time Duration Picker

A duration time picker directive that allows a user to select a time via a dropdown widget.

  • Click the buttons to change time
  • Scroll with your mouse to change time
  • Support time copy/paste (e.g, 1 year 2 months 3 days 12:34:56)

Dependency

  • AngularJS
  • Bootstrap (Or you can customise by yourself)
  • Angular-ui dropdown menu
  • Font awesome (Or you can provide your icon set)
  • jQuery

Usage

<script src="src/timepicker.js"></script>

Configuration

The following options can be set either through data attributes on the time input or by overriding the EzTimepickerConfig constant.

{
  yearStep            : 1,
  monthStep           : 1,
  dayStep             : 1,
  hourStep            : 1,
  minuteStep          : 1,
  secondStep          : 1,
  meridians           : ['AM', 'PM'],
  showYear            : 'true',
  showMonth           : 'true',
  showDay             : 'true',
  showHour            : 'true',
  showMinute          : 'true',
  showSecond          : 'true',
  showMeridian        : 'true',
  inputContainerClass : 'input-group',
  incIconClass        : 'icon-chevron-up',
  decIconClass        : 'icon-chevron-down'
}

Example

<body ng-app="myApp" ng-controller="RootCtrl">
	<input
		ez-timepicker       = "data"
		show-meridian       = "false"
		show-year           = "true"
		show-month          = "true"
		show-day            = "true"
		data-inc-icon-class = "fa fa-chevron-up"
		data-dec-icon-class = "fa fa-chevron-down"
	/>
</body>
angular.module('myApp', ['ez.timepicker', 'ui.bootstrap'])
.controller('RootCtrl', ['$scope', function($scope) {
 	$scope.data = '12:34:55';
 }
]);

If the default time is not set, it will set current time as default time.

LICENSE

MIT Lisece

time-duration-picker's People

Contributors

0x333333 avatar

Watchers

James Cloos avatar Suji Joe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.