trentrichardson datetimepicker和timepicker不起作用 [英] trentrichardson datetimepicker and timepicker doesn't work

查看:92
本文介绍了trentrichardson datetimepicker和timepicker不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关trentrichardson timepicker插件( http://trentrichardson.com/examples/timepicker/)对于datetimepicker和timepicker,它似乎工作了有限的时间(一天6个小时),然后,它停止工作.为了解决这个问题,我替换了插件CDN( http://trentrichardson.com /examples/timepicker/jquery-ui-timepicker-addon.js ),对于同一个,它又可以正常工作.

For the trentrichardson timepicker addon (http://trentrichardson.com/examples/timepicker/) for datetimepicker and timepicker, it seems to work for a limited amount of time (6 hours to a day), THEN, it stops working. TO FIX THIS, I replace the addon CDN (http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js), for the same one, and it works again.

怎么可能?我也将CDN的顺序正确设置了.

How could this be? I put the CDN's in the correct order as well...

  1. jQuery
  2. jQueryUI(带有日期选择器和滑块假发)
  3. 时间选择器
  4. 然后是CSS

P.S.我从输入中删除了main.css文件和相应的class =".

P.S. I removed my main.css file and corresponding class="" from the inputs.

再一次,它一天可以工作6个小时,然后停止工作...没有任何变化.而且我非常确定CDN也不会更改,但是它们可能会更改,但这无关紧要,因为文件路径本身不会更改.让我知道您的想法,谢谢!另外,当它停止工作时,我检查了文件路径,它们仍然有效.

Once again, it works for 6 hours to a day, then stops working... with nothing changing. And I'm pretty sure the CDN's are not changing either, but they may be, but that should not matter since the file path itself is not changing. Let me know what you think, thanks! ALSO, when it stops working, I checked the file paths and they are still valid.

代码:

<!doctype html>
<html>
<head>

<meta charset="utf-8">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>  
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css">
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js"></script>
<link rel="stylesheet" href="http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.css">

<script> 
$(function() {
    $( "#datetimepicker" ).datetimepicker();
});

$(function() {
    $( "#timepicker" ).timepicker();
});
</script>
</head>

<body>
</body>
</html>

<?php
echo '<input type="text" id="datetimepicker" size="12px">';
echo '<input type="text" id="timepicker" size="2px">';
?>

推荐答案

从去年开始,特伦特·理查森(Trent Richardson)明确开始阻止与其网站的热链接:

Trent Richardson has explicitly started preventing hotlinks to his site as of last year:

http://trentrichardson.com/2012/09/27/no -more-hotlinking/

您的热链接可能仅偶尔起作用,或者根本不起作用.

Your hotlinks may only work sporadically, or may not work at all.

您应该使用 jsdeliver.com (托管他的时间选择器插件)或找到另一个CDN.

You should use jsdeliver.com (which hosts his timepicker plugin) or find another CDN.

这篇关于trentrichardson datetimepicker和timepicker不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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