Skip to content

Commit

Permalink
Merge pull request #62 from szkrd/master
Browse files Browse the repository at this point in the history
chore(dependency): angular-ui-bootstrap 0.14.3 requires the "uib" pre…
  • Loading branch information
Gillardo committed Nov 2, 2015
2 parents 6f6daa4 + 345a3a2 commit 5001b88
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
6 changes: 3 additions & 3 deletions datetime-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
appendToBody: false,
showButtonBar: true
})
.directive('datetimePicker', ['$compile', '$parse', '$document', '$timeout', '$position', 'dateFilter', 'dateParser', 'uiDatetimePickerConfig', '$rootScope',
.directive('datetimePicker', ['$compile', '$parse', '$document', '$timeout', '$uibPosition', 'dateFilter', 'uibDateParser', 'uiDatetimePickerConfig', '$rootScope',
function ($compile, $parse, $document, $timeout, $position, dateFilter, dateParser, uiDatetimePickerConfig, $rootScope) {
return {
restrict: 'A',
Expand Down Expand Up @@ -77,10 +77,10 @@
// popup element used to display calendar
var popupEl = angular.element('' +
'<div date-picker-wrap>' +
'<div datepicker></div>' +
'<div uib-datepicker></div>' +
'</div>' +
'<div time-picker-wrap>' +
'<div timepicker style="margin:0 auto"></div>' +
'<div uib-timepicker style="margin:0 auto"></div>' +
'</div>');

// get attributes from directive
Expand Down
14 changes: 8 additions & 6 deletions dist/datetime-picker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://github.com/Gillardo/bootstrap-ui-datetime-picker
// Version: 1.2.6
// Released: 2015-10-21
// Version: 1.2.7
// Released: 2015-10-26
angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.position'])
.constant('uiDatetimePickerConfig', {
dateFormat: 'yyyy-MM-dd HH:mm',
Expand All @@ -21,7 +21,7 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
appendToBody: false,
showButtonBar: true
})
.directive('datetimePicker', ['$compile', '$parse', '$document', '$timeout', '$position', 'dateFilter', 'dateParser', 'uiDatetimePickerConfig', '$rootScope',
.directive('datetimePicker', ['$compile', '$parse', '$document', '$timeout', '$uibPosition', 'dateFilter', 'uibDateParser', 'uiDatetimePickerConfig', '$rootScope',
function ($compile, $parse, $document, $timeout, $position, dateFilter, dateParser, uiDatetimePickerConfig, $rootScope) {
return {
restrict: 'A',
Expand Down Expand Up @@ -80,10 +80,10 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
// popup element used to display calendar
var popupEl = angular.element('' +
'<div date-picker-wrap>' +
'<div datepicker></div>' +
'<div uib-datepicker></div>' +
'</div>' +
'<div time-picker-wrap>' +
'<div timepicker style="margin:0 auto"></div>' +
'<div uib-timepicker style="margin:0 auto"></div>' +
'</div>');

// get attributes from directive
Expand Down Expand Up @@ -345,8 +345,10 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
scope.isDisabled = function(date) {
var isToday = (date == 'today');

if (date === 'today' || date === 'now')
if (date === 'today' || date === 'now') {
date = new Date();
date.setHours(0, 0, 0, 0);
}

if (attrs.dateDisabled) {
return scope.dateDisabled({date: date, mode: scope.watchData['datepickerMode']});
Expand Down
6 changes: 3 additions & 3 deletions dist/datetime-picker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap-ui-datetime-picker",
"url": "https://github.com/Gillardo/bootstrap-ui-datetime-picker",
"version": "1.2.6",
"version": "1.2.7",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-angular-templates": "^0.5.7",
Expand Down

0 comments on commit 5001b88

Please sign in to comment.