我怎样才能实现这个 jQuery 时间选择器?
我有一个文本框供用户插入时间。
它的 ID 是 tarTime,所以我猜我必须启动它 $("input#tarTime")。
我需要它能够只有分钟和秒滑块。
我正在使用这个网站: http://trentrichardson.com/examples/timepicker/
我知道一点jQuery,但我似乎无法让它工作,而且我认为我已经包含了所有正确的文件。
我将非常感谢任何建议,或者一些我如何实现这一点的代码,提前谢谢你:)
I have a text box for the user to insert the time into.
It's ID is tarTime, so I am guessing that I have to start it $("input#tarTime").
I need it to be able to have just the minute and second slider.
I am using this website: http://trentrichardson.com/examples/timepicker/
I know a bit of jQuery, but I don't seem to be able to get this to work, and I think I have included all the right files.
I would be very grateful of any suggestions, or a bit of code of how I can implement this, thank you in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信您已经知道,但值得注意的是,Trent Richardson 的 Timepicker 是 jQuery UI 日期选择器的插件。
http://jqueryui.com/demos/datepicker/
您需要确保您有它也包括在内。
然后,您的语法很简单:
$('#tarTime').timepicker({});
I'm sure you're aware, but it might be worth noting that Trent Richardson's Timepicker is an addon to jQuery UI's datepicker.
http://jqueryui.com/demos/datepicker/
You'll need to make sure that you have it included as well.
Then, your syntax is simply:
$('#tarTime').timepicker({});
您需要使用:
在示例页面上,您可以看到它是第三个示例
You'll want to use:
On the examples page, you can see it is the third example