Jquery datepicker不工作焦点在textfield上

时间:2016-03-08 22:28:24

标签: javascript jquery datepicker

我试图在Jquery中创建一个示例日期选择器,但是我没有成功,在我出错的地方有任何帮助吗?

我有2个文件: HTML:

php

JS:datepicker-ar.js:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
  <script src="datepicker-ar.js"></script>
  <script>
  $(function() {
    $( "#datepicker" ).datepicker( $.datepicker.regional[ "ar" ] );
    $( "#locale" ).change(function() {
      $( "#datepicker" ).datepicker( "option",
        $.datepicker.regional[ $( this ).val() ] );
    });
  });
  </script>

</head>
<body>

<p>Date: <input type="text" id="datepicker">&nbsp;
  <select id="locale">
    <option value="ar">Arabic (&#8235;(&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;</option>
    <option value="">English</option>
  </select></p>


</body>
</html>

enter image description here

这是我试图重新创建的示例:http://jqueryui.com/datepicker/#localization

仅引用jquery 1.10.2时,我收到此错误:

enter image description here

0 个答案:

没有答案