1- # Angular bootstrap date & time picker version: 0.3.15
1+ # Angular bootstrap date & time picker version: 0.4.0
22
33Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
44
55[ ![ MIT License] [ license-image ]] [ license-url ]
66[ ![ Build Status] ( https://travis-ci.org/dalelotts/angular-bootstrap-datetimepicker.png?branch=master )] ( https://travis-ci.org/dalelotts/angular-bootstrap-datetimepicker )
77[ ![ Dependency Status] ( https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker.svg )] ( https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker )
88[ ![ devDependency Status] ( https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker/dev-status.png )] ( https://david-dm.org/dalelotts/angular-bootstrap-datetimepicker#info=devDependencies )
9+ [ ![ Commitizen friendly] ( https://img.shields.io/badge/commitizen-friendly-brightgreen.svg )] ( http://commitizen.github.io/cz-cli/ )
910[ ![ PayPal donate button] ( http://img.shields.io/paypal/donate.png?color=yellow )] ( https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=F3FX5W6S2U4BW&lc=US&item_name=Dale%20Lotts&item_number=angular%2dbootstrap%2ddatetimepicker¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted " Donate one-time to this project using Paypal ")
1011<a href =" https://twitter.com/intent/tweet?original_referer=https%3A%2F%2Fabout.twitter.com%2Fresources%2Fbuttons& ; text=Check%20out%20this%20%23AngularJS%20directive%20that%20makes%20it%20dead%20simple%20for%20users%20to%20select%20dates%20%26%20times& ; tw_p=tweetbutton& ; url=https%3A%2F%2Fgithub.com%2Fdalelotts%2Fangular-bootstrap-datetimepicker& ; via=dalelotts " target =" _blank " >
1112 <img src =" http://jpillora.com/github-twitter-button/img/tweet.png " ></img >
@@ -18,7 +19,7 @@ Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
1819#Dependencies
1920
2021Requires:
21- * AngularJS 1.2.26 or higher (1.0.x will not work)
22+ * AngularJS 1.4.x or higher (1.0.x will not work)
2223 * moment.js 2.8.3 or higher for date parsing and formatting
2324 * bootstrap's glyphicons for arrows (Can be overridden in css)
2425
@@ -30,7 +31,7 @@ This directive was written using TDD and all enhancements and changes have relat
3031
3132We use karma and jshint to ensure the quality of the code. The easiest way to run these checks is to use gulp:
3233
33- ```
34+ ``` shell
3435npm install
3536npm test
3637```
@@ -39,35 +40,27 @@ The karma task will try to open Chrome as a browser in which to run the tests.
3940Make sure Chrome is available or change the browsers setting in karma.config.js
4041
4142#Usage
42- We use bower for dependency management. Add
43-
44- ``` json
45- dependencies: {
46- "angular-bootstrap-datetimepicker" : " latest"
47- }
48- ```
43+ We use npm for dependency management, run
4944
50- To your bower.json file. Then run
51-
52- ``` html
53- bower install
45+ ``` shell
46+ npm install --save angular-bootstrap-datetimepicker
5447```
5548
5649This will copy the angular-bootstrap-datetimepicker files into your components folder, along with its dependencies.
5750
5851Add the css:
5952
6053``` html
61- <link rel =" stylesheet" href =" components /bootstrap/dist/css/bootstrap.css" >
62- <link rel =" stylesheet" href =" components /angular-bootstrap-datetimepicker/src/css/datetimepicker.css" />
54+ <link rel =" stylesheet" href =" node_modules /bootstrap/dist/css/bootstrap.css" >
55+ <link rel =" stylesheet" href =" node_modules /angular-bootstrap-datetimepicker/src/css/datetimepicker.css" />
6356```
6457
6558Load the script files in your application:
6659``` html
67- <script type =" text/javascript" src =" components /moment/moment.js" ></script >
68- <script type =" text/javascript" src =" components /bootstrap/dist/js/bootstrap.js" ></script >
69- <script type =" text/javascript" src =" components /angular/angular.js" ></script >
70- <script type =" text/javascript" src =" components /angular-bootstrap-datetimepicker/src/js/datetimepicker.js" ></script >
60+ <script type =" text/javascript" src =" node_modules /moment/moment.js" ></script >
61+ <script type =" text/javascript" src =" node_modules /bootstrap/dist/js/bootstrap.js" ></script >
62+ <script type =" text/javascript" src =" node_modules /angular/angular.js" ></script >
63+ <script type =" text/javascript" src =" node_modules /angular-bootstrap-datetimepicker/src/js/datetimepicker.js" ></script >
7164```
7265
7366Add the date module as a dependency to your application module:
@@ -170,12 +163,32 @@ String. 'minute'
170163
171164The lowest view that the datetimepicker should show.
172165
166+ Accepts the same values as startView.
167+
173168### minuteStep
174169
175170Number. Default: 5
176171
177172The increment used to build the hour view. A button is created for each <code >minuteStep</code > minutes.
178173
174+ ### configureOn
175+
176+ String. Default: null
177+
178+ Causes the date/time picker to re-read its configuration when the specified event is received.
179+
180+ For example, perhaps the startView option in the configuration has changed and you would like the
181+ new configuration to be used. You can $broadcast the event to cause this directive to use the new configuration.
182+
183+ ### renderOn
184+
185+ String. Default: null
186+
187+ Causes the date/time picker to re-render its view when the specified event is received.
188+
189+ For example, if you want to disable any dates or times that are in the past.
190+ You can $broadcast the event at an interval to disable times in the past (or any other time valid dates change).
191+
179192### dropdownSelector
180193
181194When used within a Bootstrap dropdown and jQuery, the selector specified in dropdownSelector will toggle the dropdown when a date/time is selected.
0 commit comments