Skip to content

Commit

Permalink
Fixed #153
Browse files Browse the repository at this point in the history
  • Loading branch information
Gillardo committed Jan 19, 2017
1 parent 50e4eda commit 71d4c62
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions datetime-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
}

// popup element used to display calendar
var timezone = null;
var popupEl = angular.element('' +
'<div date-picker-wrap>' +
'<div uib-datepicker></div>' +
Expand All @@ -131,8 +132,6 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
}

popupEl.attr('ng-model-options', 'ngModelOptions');
} else {
timezone = null;
}

// get attributes from directive
Expand Down Expand Up @@ -167,7 +166,9 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
var timepickerEl = angular.element(popupEl.children()[1]);

if (!$scope.timepickerOptions)
$scope.timepickerOptions = {};
$scope.timepickerOptions = {
showMeridian: true
};

for (var key in $scope.timepickerOptions) {
timepickerEl.attr(cameltoDash(key), 'timepickerOptions.' + key);
Expand Down
7 changes: 4 additions & 3 deletions dist/datetime-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
}

// popup element used to display calendar
var timezone = null;
var popupEl = angular.element('' +
'<div date-picker-wrap>' +
'<div uib-datepicker></div>' +
Expand All @@ -134,8 +135,6 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
}

popupEl.attr('ng-model-options', 'ngModelOptions');
} else {
timezone = null;
}

// get attributes from directive
Expand Down Expand Up @@ -170,7 +169,9 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
var timepickerEl = angular.element(popupEl.children()[1]);

if (!$scope.timepickerOptions)
$scope.timepickerOptions = {};
$scope.timepickerOptions = {
showMeridian: true
};

for (var key in $scope.timepickerOptions) {
timepickerEl.attr(cameltoDash(key), 'timepickerOptions.' + key);
Expand Down
Loading

0 comments on commit 71d4c62

Please sign in to comment.