kineticsocial / angularjs-datetime-picker

AngularJS DateTime Picker Without JQuery and Bootstrap
MIT License
66 stars 79 forks source link

Simple DateTime Picker For AngularJS

No JQuery, No Bootstrap, Just AngularJS (ver. 1.3+)

DEMO Imgur

To Get Started

For Bower users,

$ bower install angularjs-datetime-picker

  1. Include angularjs-datetime-picker.js and angularjs-datetime-picker.css

    <link rel="stylesheet" href="https://github.com/kineticsocial/angularjs-datetime-picker/blob/master/angularjs-datetime-picker.css" />
    <script src="https://github.com/kineticsocial/angularjs-datetime-picker/raw/master/angularjs-datetime-picker.js"></script>
  2. add it as a dependency

    var myApp = angular.module('myApp', ['angularjs-datetime-picker']);
  3. Use it

    <input datetime-picker ng-model="model" />

Attributes

Examples

<input ng-model="date1" datetime-picker date-only />

<input ng-model="date1" datetime-picker date-only future-only />

<input ng-model="date2" datetime-picker date-format="yyyy-MM-dd" date-only />

<input ng-model="date3" datetime-picker date-format="yyyy-MM-dd HH:mm:ss" />

<input ng-model="date4" datetime-picker hour="23" minute='59'/>

<input ng-model="date5" datetime-picker date-format="yyyy-MM-dd HH:mm:ss" year="2014" month="12" day="31" />