wrong focus in case two timepicker fields as input-group-btn
In case you have two Input Groups both with a timepicker input-Group-btn and you select the timepicker of the top Input Group the Focus of the second Input Group field is on top of the timepicker.
Difficult to explain. Please test the following and press both buttons:
<!doctype html>
<div class="form-group">
<div class="input-group">
<span class="input-group-btn">
<span class="btn btn-default" uib-dropdown ng-click="updateTimePickerValues()" auto-close="outsideClick">
<a href uib-dropdown-toggle>
<i class="glyphicon glyphicon-time"></i>
</a>
<ul class="uib-dropdown-menu" role="menu">
<li>
<!doctype html>
<html ng-app="ui.bootstrap.demo">
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular-animate.js"></script>
<script src="//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.14.3.js"></script>
<script src="example.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div ng-controller="TimepickerDemoCtrl">
<div class="form-group">
<div class="input-group">
<span class="input-group-btn">
<span class="btn btn-default" uib-dropdown ng-click="updateTimePickerValues()" auto-close="outsideClick">
<a href uib-dropdown-toggle>
<i class="glyphicon glyphicon-time"></i>
</a>
<ul class="uib-dropdown-menu" role="menu">
<li>
<uib-timepicker ng-model="mytime" ng-change="changed()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></uib-timepicker>
</li>
</ul>
</span>
</span>
<input class="form-control" id="id_tt_from" name="tt_from" ng-model="xxx" ng-required="true" type="text" />
</div>
</div>
<div class="form-group">
<div class="input-group">
<span class="input-group-btn">
<span class="btn btn-default" uib-dropdown ng-click="updateTimePickerValues()" auto-close="outsideClick">
<a href uib-dropdown-toggle>
<i class="glyphicon glyphicon-time"></i>
</a>
<ul class="uib-dropdown-menu" role="menu">
<li>
<uib-timepicker ng-model="mytime2" ng-change="changed()" hour-step="hstep" minute-step="mstep" show-meridian="ismeridian"></uib-timepicker>
</li>
</ul>
</span>
</span>
<input class="form-control" id="id_tt_to" name="tt_to" ng-model="xxx" />
</div>
</div>
</div>
</body>
</html>
example.js:
angular.module('ui.bootstrap.demo', ['ngAnimate', 'ui.bootstrap']); angular.module('ui.bootstrap.demo').controller('TimepickerDemoCtrl', function ($scope, $log) { $scope.mytime = new Date();
$scope.hstep = 1; $scope.mstep = 15;
$scope.options = { hstep: [1, 2, 3], mstep: [1, 5, 10, 15, 25, 30] };
$scope.ismeridian = true; $scope.toggleMode = function() { $scope.ismeridian = ! $scope.ismeridian; };
$scope.update = function() { var d = new Date(); d.setHours( 14 ); d.setMinutes( 0 ); $scope.mytime = d; };
$scope.changed = function () { $log.log('Time changed to: ' + $scope.mytime); };
$scope.clear = function() { $scope.mytime = null; }; });
Can you post a reproduction on Plunker?
Sure. Was not Aware that this is so easy ...
http://plnkr.co/edit/aklWZsMRUanc0LqJTqUD?p=preview
Cleaned up the HTML here.
This appears to be a CSS issue to me, although I'm having trouble identifying the culprit - this is probably something that can be fixed on the user side.
Closing in favor of #5957 as this will result in a complete rewrite of the widget, addressing all the outstanding issues.