diff --git a/src/ui/public/angular-bootstrap/datepicker/datepicker.html b/src/ui/public/angular-bootstrap/datepicker/datepicker.html
index 1ecb3c50b4706..807ef80a936a5 100755
--- a/src/ui/public/angular-bootstrap/datepicker/datepicker.html
+++ b/src/ui/public/angular-bootstrap/datepicker/datepicker.html
@@ -1,5 +1,5 @@
-
+
-
\ No newline at end of file
+
diff --git a/src/ui/public/angular-bootstrap/datepicker/datepicker.js b/src/ui/public/angular-bootstrap/datepicker/datepicker.js
index 6a75a99788c1d..aa3a4dd50c0a9 100755
--- a/src/ui/public/angular-bootstrap/datepicker/datepicker.js
+++ b/src/ui/public/angular-bootstrap/datepicker/datepicker.js
@@ -119,6 +119,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
} else {
self.activeDate = date;
$scope.datepickerMode = self.modes[ self.modes.indexOf( $scope.datepickerMode ) - 1 ];
+ focusElement();
}
};
@@ -137,6 +138,7 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
}
$scope.datepickerMode = self.modes[ self.modes.indexOf( $scope.datepickerMode ) + direction ];
+ focusElement();
};
// Key event mapper
@@ -150,31 +152,6 @@ angular.module('ui.bootstrap.datepicker', ['ui.bootstrap.dateparser', 'ui.bootst
// Listen for focus requests from popup directive
$scope.$on('datepicker.focus', focusElement);
-
- $scope.keydown = function( evt ) {
- var key = $scope.keys[evt.which];
-
- if ( !key || evt.shiftKey || evt.altKey ) {
- return;
- }
-
- evt.preventDefault();
- evt.stopPropagation();
-
- if (key === 'enter' || key === 'space') {
- if ( self.isDisabled(self.activeDate)) {
- return; // do nothing
- }
- $scope.select(self.activeDate);
- focusElement();
- } else if (evt.ctrlKey && (key === 'up' || key === 'down')) {
- $scope.toggleMode(key === 'up' ? 1 : -1);
- focusElement();
- } else {
- self.handleKeyDown(key, evt);
- self.refreshView();
- }
- };
}])
.directive( 'datepicker', function () {