Skip to content

Commit 675f83b

Browse files
committed
Merge branch 'release/0.3.3'
2 parents b25181b + 4d65e27 commit 675f83b

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Angular bootstrap date & time picker v0.3.2
1+
# Angular bootstrap date & time picker v0.3.3
22
================================
33

44
Native AngularJS datetime picker directive styled by Twitter Bootstrap 3

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-bootstrap-datetimepicker",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "This directive allows you to add a datetime-picker to your form.",
55
"author": "https://github.com/dalelotts/angular-bootstrap-datetimepicker/graphs/contributors",
66
"license": "MIT",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-bootstrap-datetimepicker",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "This directive allows you to add a datetime-picker to your form elements.",
55
"author": "https://github.com/dalelotts/ng-bootstrap-datetimepicker/graphs/contributors",
66
"license": "MIT",

src/css/datetimepicker.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license angular-bootstrap-datetimepicker v0.3.2
2+
* @license angular-bootstrap-datetimepicker v0.3.3
33
* (c) 2013-2014 Knight Rider Consulting, Inc. http://www.knightrider.com
44
* License: MIT
55
*/

src/js/datetimepicker.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*jslint vars:true */
33

44
/**
5-
* @license angular-bootstrap-datetimepicker v0.3.2
5+
* @license angular-bootstrap-datetimepicker v0.3.3
66
* (c) 2013-2014 Knight Rider Consulting, Inc. http://www.knightrider.com
77
* License: MIT
88
*/
@@ -20,7 +20,7 @@ angular.module('ui.bootstrap.datetimepicker', [])
2020
minView: 'minute',
2121
startView: 'day'
2222
})
23-
.directive('datetimepicker', ['dateTimePickerConfig', function (defaultConfig) {
23+
.directive('datetimepicker', ['$log', 'dateTimePickerConfig', function ($log, defaultConfig) {
2424
"use strict";
2525

2626
function DateObject() {
@@ -31,6 +31,7 @@ angular.module('ui.bootstrap.datetimepicker', [])
3131
var validProperties = ['dateValue', 'display', 'active', 'selectable', 'past', 'future'];
3232

3333
for (var prop in arguments[0]) {
34+
/* istanbul ignore else */
3435
//noinspection JSUnfilteredForInLoop
3536
if (validProperties.indexOf(prop) >= 0) {
3637
//noinspection JSUnfilteredForInLoop
@@ -305,7 +306,14 @@ angular.module('ui.bootstrap.datetimepicker', [])
305306
scope.ngModel = newDate;
306307

307308
if (configuration.dropdownSelector) {
308-
jQuery(configuration.dropdownSelector).dropdown('toggle');
309+
310+
/* istanbul ignore else */
311+
if (typeof jQuery !== 'undefined') {
312+
jQuery(configuration.dropdownSelector).dropdown('toggle');
313+
} else {
314+
$log.error("Please DO NOT specify the dropdownSelector option unless you are using jQuery. " +
315+
"Please include jQuery or write code to close the dropdown in the on-set-time callback. ");
316+
}
309317
}
310318

311319
scope.onSetTime({ newDate: scope.ngModel, oldDate: oldDate });

0 commit comments

Comments
 (0)