Skip to content

Commit

Permalink
Fixed #111
Browse files Browse the repository at this point in the history
  • Loading branch information
Gillardo committed Apr 7, 2016
1 parent d42cee0 commit 865d676
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootstrap-ui-datetime-picker",
"version": "2.3.0",
"version": "2.3.1",
"homepage": "https://github.com/Gillardo/bootstrap-ui-datetime-picker",
"authors": [
"Gillardo <[email protected]>"
Expand Down
11 changes: 5 additions & 6 deletions datetime-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,6 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
}

$scope.dateSelection(date);

if (opt == 'clear')
$scope.close();
};

$scope.open = function (picker, evt) {
Expand All @@ -388,9 +385,11 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo

// in order to update the timePicker, we need to update the model reference!
// as found here https://angular-ui.github.io/bootstrap/#/timepicker
$timeout(function() {
$scope.date = new Date($scope.date);
}, 50);
if (picker == 'time') {
$timeout(function() {
$scope.date = parseDateString(ngModel.$viewValue);
}, 50);
}
};

$scope.close = function (closePressed) {
Expand Down
13 changes: 6 additions & 7 deletions dist/datetime-picker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// https://github.com/Gillardo/bootstrap-ui-datetime-picker
// Version: 2.3.0
// Version: 2.3.1
// Released: 2016-04-07
angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bootstrap.position'])
.constant('uiDatetimePickerConfig', {
Expand Down Expand Up @@ -373,9 +373,6 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo
}

$scope.dateSelection(date);

if (opt == 'clear')
$scope.close();
};

$scope.open = function (picker, evt) {
Expand All @@ -391,9 +388,11 @@ angular.module('ui.bootstrap.datetimepicker', ['ui.bootstrap.dateparser', 'ui.bo

// in order to update the timePicker, we need to update the model reference!
// as found here https://angular-ui.github.io/bootstrap/#/timepicker
$timeout(function() {
$scope.date = new Date($scope.date);
}, 50);
if (picker == 'time') {
$timeout(function() {
$scope.date = parseDateString(ngModel.$viewValue);
}, 50);
}
};

$scope.close = function (closePressed) {
Expand Down
Loading

0 comments on commit 865d676

Please sign in to comment.