Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Arschmitz jQuery移动日期选择器格式日期_Jquery_Jquery Ui_Jquery Mobile_Datepicker_Jquery Ui Datepicker - Fatal编程技术网

Arschmitz jQuery移动日期选择器格式日期

Arschmitz jQuery移动日期选择器格式日期,jquery,jquery-ui,jquery-mobile,datepicker,jquery-ui-datepicker,Jquery,Jquery Ui,Jquery Mobile,Datepicker,Jquery Ui Datepicker,我使用来自的日期选择器 对于jquerymobile <label for="nachname">Geburtsdatum</label> <input type="text" id="datepicker" data-role="date" name="gebdat"> Geburtsdatum 与 $(函数(){ $('#datepicker').date({dateFormat:'yy-mm-dd'}).val() }); 但格式仍然是2014年

我使用来自的日期选择器 对于jquerymobile

<label for="nachname">Geburtsdatum</label>
<input type="text" id="datepicker" data-role="date" name="gebdat">
Geburtsdatum


$(函数(){
$('#datepicker').date({dateFormat:'yy-mm-dd'}).val()
});
但格式仍然是2014年4月16日

你能帮我吗?


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!--jQuery-->
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<!--jQuery UI-->
<script src="http://view.jqueryui.com/master/ui/datepicker.js"></script>
<!--jQuery Mobil--> 
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css">  
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
<!-- jQuery Mobile Datepicker -->
<link href="http://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.css" rel="stylesheet">
<script src="http://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.js"></script>
</head>

<body>

<div data-role="page" id="pageone">
<div data-role="header">
<h1>Start</h1>
</div>

<div data-role="main" class="ui-content"> 
<form action="this.php" method="post" data-ajax="true">
<label for="gebdat">Date</label>
<input type="text" name="gebdat" data-role="date" data-date-format="yy-mm-dd" >

<button type="submit" name="submit" class="ui-btn-hidden" data-icon="edit" aria-disabled="false">Save</button>

</form>
 </div>

  <div data-role="footer">
    <h1>End</h1>
  </div>
</div> 

</body>

</html>
开始 日期 拯救 终止

使用
data date format=“yy-mm-dd”
设置格式,而不是使用jQuery

我就是这样解决我的问题的。页面上说它是jQueryUIBase的扩展,所以我基本上遵循了jQueryUI如何设置其格式

$( "#startDate" ).datepicker({"dateFormat": "yy/mm/dd"});

希望这有帮助

请更具体地说明您在哪里看到这个问题?与提交日期的格式相比,字段中显示的值的格式是什么。请始终校对您的操作。。。在我修复之前,你发布的Github链接出现了404错误。该链接适合我。有什么问题吗?我想显示它2014-04-07,但它是Displays 04/07/2014。(它给出了404错误,因为它缺少用户名,
/arschmitz/
,url段)。上述两种方法对我都不起作用。还有其他想法吗?这是我的日期选择器HTML
这是JS
$('#txtSurveyAllottedOn')。日期选择器({“dateFormat”:“dd/mm/yy”})
$( "#startDate" ).datepicker({"dateFormat": "yy/mm/dd"});