0
完全正常
https://jqueryui.com/datepicker/jQuery UI的不DatePicker的
的jQuery UI的日期選擇器看起來就像上面,但我的版本如下所示。
我的jQuery文件是
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
/*"~/Scripts/jquery-{version}.js",*/
"~/Scripts/jquery-1.12.4.min.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
//"~/Scripts/jquery-ui-{version}.js",
// "~/Scripts/jquery-ui-*",
"~/Scripts/jquery.switchButton.js",
"~/Scripts/jquery-ui.min.js"
));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
bundles.Add(new ScriptBundle("~/bundles/dataTables").Include(
"~/Scripts/media/js/jquery.dataTables.js"));
bundles.Add(new ScriptBundle("~/bundles/moment").Include(
"~/Scripts/moment.js"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.js",
"~/Scripts/respond.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css"));
}
}
}
我添加的jQuery和jQuery UI的最新的穩定版本,並改變了包的配置,以避免重複錯誤(這是我不得不開始見Uncaught TypeError: undefined is not a function in datepicker)
一個StackOverflow答案說,moment.js應該高於jQuery UI,但我沒有發現任何變化,現在我完全難住了,因爲沒有看到jQuery UI部分像這樣工作。請幫忙!
提到的鏈接各個版本太感謝你了,對不起已故性反應 –
涅瓦河的心..編碼愉快.. :) –