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>