简体   繁体   English

trentrichardson datetimepicker和timepicker不起作用

[英]trentrichardson datetimepicker and timepicker doesn't work

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. 对于用于datetimepicker和timepicker的trentrichardson timepicker插件( http://trentrichardson.com/examples/timepicker/ ),它似乎只工作了有限的时间(一天6个小时),然后便停止了工作。 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( http://trentrichardson.com/examples/timepicker/jquery-ui-timepicker-addon.js )替换为同一CDN,它又可以正常工作了。

How could this be? 怎么会这样 I put the CDN's in the correct order as well... 我也把CDN的顺序正确...

  1. jQuery jQuery的
  2. jQueryUI (with datepicker and slider wigits) jQueryUI(带有日期选择器和滑块wigits)
  3. Timepicker Timepicker
  4. Then CSS 然后是CSS

PS I removed my main.css file and corresponding class="" from the inputs. PS我从输入中删除了main.css文件和相应的class =“”。

Once again, it works for 6 hours to a day, then stops working... with nothing changing. 再次,它一天可以工作6个小时,然后停止工作...没有任何变化。 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. 而且我非常确定CDN也不会更改,但是它们可能会更改,但这无关紧要,因为文件路径本身不会更改。 Let me know what you think, thanks! 让我知道您的想法,谢谢! ALSO, when it stops working, I checked the file paths and they are still valid. 另外,当它停止工作时,我检查了文件路径,它们仍然有效。

Code: 码:

<!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 has explicitly started preventing hotlinks to his site as of last year: 特伦特·理查森(Trent Richardson)从去年开始明确开始阻止与其网站的热链接:

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

Your hotlinks may only work sporadically, or may not work at all. 您的热链接可能仅偶尔起作用,或者根本不起作用。

You should use jsdeliver.com (which hosts his timepicker plugin) or find another CDN. 您应该使用jsdeliver.com (托管他的timepicker插件)或找到另一个CDN。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM