jQuery的日期时间选择器的日期格式问题 [英] Jquery Datetime picker Date format Issue
本文介绍了jQuery的日期时间选择器的日期格式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用jQuery日期时间选择器。它显示在日期YY / MMM / DD HH:MM:SS关于选择日期和时间
格式。我不能够改变其格式。我怎样才能将其更改为我的自定义格式DD / MM / YYYY HH:MM
I am using jquery datetime picker. it is showing date in "yy/MMM/dd hh:mm:ss"
format on selecting the date and time. i am not able to change its format. How can i change it to my custom format "dd/MM/yyyy hh:mm"
推荐答案
您可以在这样的初始化设置:
You can set it at initialization like this:
$([selector]).datepicker({
dateFormat: "dd/MM/yyy hh:mm"
});
或者你可以用下面的code设置初始化后的日期格式为:
Or you can set the date format after initialization using the following code:
$(.selector).datepicker(选项,日期格式,YY-MM-DD');
这篇关于jQuery的日期时间选择器的日期格式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文