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.
精彩评论