我正在尝试更改 JQM UI Datepicker 中的日期格式。
它有一个输入,当您更改日期时显示日期。
我需要它以 dd/mm/yyyy 格式显示。
有人可以帮忙吗?
更新:
我正在尝试这个,但没有任何改变:
<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');
更多引用here
关于javascript - JQuery Mobile UI DatePicker 更改日期格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6106970/