2015-05-27 83 views
0

嗨我有HTML頁面,我有日期選擇器的輸入字段,但日期選擇器不工作。以下是我的代碼。爲什麼數據角色在Jquery Mobile中不起作用?

<!DOCTYPE html> 
 
<html> 
 
<head> 
 
    <title>welcome</title> 
 
    <meta name="viewport" content="width=device-width, initial-scale=1"> 
 
    \t <link href="../CSS/Final_Pages/CSS/tableStyle.css" rel="stylesheet" /> 
 
    <link href="../CSS/tableStyleResponsive.css" rel="stylesheet" />  
 
    <link href="../CSS/Custom_style.css" rel="stylesheet" /> 
 
    <link href="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.css" rel="stylesheet" /> 
 
    <script src="http://code.jquery.com/jquery-2.1.1.js"></script> 
 
    <script src="http://code.jquery.com/mobile/1.4.4/jquery.mobile-1.4.4.min.js"></script> 
 
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> 
 
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> 
 
</head> 
 
<body> 
 
    <div data-role="page"> 
 
    <form name="Basicinfo" id="Basicinfo" method="post" action="%bind(:11)"> 
 
     <div role="main" class="ui-content"> 
 
     <!-- Other Information Field Starts--> 
 
     <div data-role="fieldcontain"> 
 
      <label id="doblbl">Date Of Birth:</label> 
 
      <input type="text" id="dob" name="dob" value="" data-role="date" /> 
 
     </div> 
 
     </div> 
 
    </form> 
 
    </div> 
 
</body> 
 

 
</html>

+0

你爲什麼要引用的jQuery 2.1.1和1.7?刪除1.7參考。 – ezanker

回答

0

嘗試看看這個:

不知道它是你想找的

<div id="indexPage" data-role="page"> 
 
    <input type="date" id="date_val" data-role="datebox" style="margin-top: 10px" data-options='{"mode": "calbox", "useNewStyle":true,"useFocus": true}'> 
 
</div> 
 

 
<script src="http://code.jquery.com/jquery-latest.min.js"></script> 
 
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script> 
 
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css"> 
 

 
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.core.min.js"></script> 
 
<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.calbox.min.js"></script> 
 
<script type="text/javascript" src=" http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.datebox.min.js"></script> 
 
<link rel="stylesheet" type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.min.css" /> 
 

相關問題