Bootstrap Timepicker不显示 [英] Bootstrap Timepicker not displaying

查看:482
本文介绍了Bootstrap Timepicker不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个模式窗口,其中有一个表,用户可以在其中选择时间.我可以在此示例中的表中使用时间选择器.

I have a modal window where I have a table where the user can choose times. I was able to get the timepicker to work inside the tables in this example.

$('.timepicker').timepicker().on('changeDate', function(ev){
         $('.timepicker').timepicker('hide');
         });

但是,在此示例中,时间选择器未显示.没有异常被抛出.

However, in this example the timepicker is not displaying. There are no exceptions being thrown.

推荐答案

我最终使用了 jquery插件,它可以直接选择时间.

I ended up going with a jquery plugin which worked right out of the box for selecting the times.

HTML

<label><input id="mondayStartTime" type="text" style="width:100px" data-bind="value: mondayStartTime" class="time ui-timepicker-input"></input>Start</label>
<label><input id="mondayEndTime" type="text" style="width:100px" data-bind="value: mondayEndTime" class="time ui-timepicker-input"></input>End</label>

JavaScript

$('#mondayStartTime').timepicker();
$('#mondayEndTime').timepicker();

可通过 CDN 获得.

它在模式对话框中运行良好.

It works well inside the modal dialog.

这里是一个例子:

http://jsfiddle.net/jkittell/C8w8v/126/

这篇关于Bootstrap Timepicker不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆