开发者

jquery datepicker strange issue

Why would when using this code in one place set the default as it should but not when moving first two statements into Master file and the last one into View file (ASP.NET MVC app)?

$(function () {
$(".editDate").datepicker({ dateFormat开发者_Python百科: 'dd.mm.yy' });
$(".editDate").datepicker($.datepicker.regional['sl']);
$("#IssueDate").datepicker('setDate', new Date()); // if I separate this one into it own file, it never sets the default date
}); 

??


without seeing the rest of the code, I would guess that you are trying to call "setDate" before the js that actually turns your input into a datepicker gets called.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜