2016-12-02 86 views
0

我想實現顯示日曆寡婦當用戶在文本框中單擊,但沒有發生,我也嘗試使用HTML5日期類型控制,但也沒有顯示。請幫忙。日期選擇器功能不起作用?

<script src="js/jquery.min-3.1.1.js"></script> 

<script> 
    $(document).ready($(function(){ 
     $("#datepicker").datepicker(); 
     }); 
    }); 
</script> 

<input type="text" id="datepicker"> 
+0

你沒有jQuery UI的打電話給你的jQuery UI的 –

+0

和jQuery UI的JS和jQuery UI CSS過那麼日期選擇器會顯示 – Geeky

回答

2
<html lang="en"> 
<head> 
    <meta charset="utf-8"> 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
    <title>jQuery UI Datepicker - Default functionality</title> 
    <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> 
    <link rel="stylesheet" href="/resources/demos/style.css"> 
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script> 
    <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> 
    <script> 
    $(function() { 
    $("#datepicker").datepicker(); 
    }); 
    </script> 
</head> 
<body> 

<p>Date: <input type="text" id="datepicker"></p> 


</body> 
</html> 
+0

它的工作原理,但是當我嘗試同樣的事情我的代碼沒有。 Idk可能是什麼問題。 – phpNoob

+1

查看檢查元素中的錯誤。 –

相關問題