jQuery Mobile UI DatePicker更改日期格式 [英] JQuery Mobile UI DatePicker Change Date Format
本文介绍了jQuery Mobile UI DatePicker更改日期格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在JQM UI Datepicker中更改日期格式.
I am trying to change the date format in the JQM UI Datepicker.
有一个输入,可以显示您更改日期的日期.
It's got an input which display's the dates as you change them.
我需要它以dd/mm/yyyy格式显示.
I need it to display in dd/mm/yyyy format.
任何人都可以帮忙吗?
更新:
我正在尝试,但是没有任何变化:
I'm trying this, but nothing's changing:
<script>
//reset type=date inputs to text
$( document ).bind( "mobileinit", function(){
$.mobile.page.prototype.options.degradeInputs.date = true;
});
</script>
<script language="javascript">
$(document).ready(function() {
$.datepicker.formatDate('dd/mm/yyyy'); //ADDED HERE
$("input[type='submit']").click(function(e) {
e.preventDefault();
});
});
</script>
推荐答案
尝试一下$.datepicker.formatDate('dd/mm/yyyy');
更多参考此处
这篇关于jQuery Mobile UI DatePicker更改日期格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文