我已使用以下代码在我的应用中创建时间选择器:
http://jdewit.github.io/bootstrap-timepicker/
但是,这不会在iPad和触摸设备上打开弹出计时器。怎么了

HTML:

<div class="btn-group" dropdown dropdown-append-to-body id="ddlETA">
	<div id="btn-append-to-body" type="button" class="btn btn-primary" 		dropdown-toggle
	tabindex="4"
	   ng-click="vm.showETA()"
	   title="ETA"
	>
		 ETA<span class="caret"
		></span>
	</div>
	<ul class="dropdown-menu" role="menu" aria-labelledby="btn-append-to-body"

	>
		<li role="menuitem">
			<a href="" ng-click="$event.stopPropagation()">Start Time
				<div class="input-group bootstrap-timepicker">
					<input type="text" id="timepicker1" class="form-control input-small" placeholder="" aria-describedby="sizing-addon2"
					ng-model="vm.startTime"
					ng-change="vm.getETACount('time')
					/>
					<span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span>
				</div>
			</a>
		</li>

		<script type="text/javascript">
			/*$("#timepicker1").on("click", function(e){
				$('#timepicker1').timepicker();
				e.stopPropagation();
			});*/
			$('#timepicker1').timepicker();
			$('#timepicker2').timepicker();
		</script>
	</ul>
</div>


我的bower.json:

"bootstrap-3-timepicker": "~0.2.8",
    "bootstrap-toggle": "~2.2.0",
    "bootstrap-ui-datetime-picker": "~1.2.1",
    "es5-shim": "~3.1.0",
    "jquery": "~1.11.2",

最佳答案

尝试将showClose: true添加到您的timePicker。至少可以解决IOS上的问题

关于ios - 下拉菜单中的Timepicker在iPad和触摸设备上不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/32501332/

10-12 12:32