【发布时间】:2013-01-20 16:19:46
【问题描述】:
我无法更改日期格式.. 快把我的头发扯掉了。搜索API并尝试了一切。什么都试过了
HTML
<body>
<p>Date:
<input type="text" id="datepicker" />
</p>
</body>
jQuery
$(function () {
$(".selector").datepicker({
dateFormat: 'dd-mm-yy'
});
$("#datepicker").datepicker({
showOn: "button",
buttonImage: "calendar_icon120121018-7997-10s714y-0_original.png",
buttonImageOnly: true
});
});
【问题讨论】:
-
代码显示
dateformat所以你还没有解释问题是什么。请更具体,如果问题与外部数据有关,请提供样本 -
在
#datepicker中定义日期格式 -
我希望日期为 = 日月年,而不是默认的 = 月、日、年
标签: jquery jquery-ui datepicker date-format