2016-06-21 18 views
0

https://jqueryui.com/datepicker/jQueryのUIは完全に日付ピッカー

enter image description here

で作業していないのjQuery UIの日付ピッカーは、上記のように見えますが、私のバージョンは、次のようになります。 enter image description here

私のjQueryのファイルが

enter image description here

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の最新の安定版を追加し、重複エラーを回避するために、バンドルの設定を変更

enter image description here

Uncaught TypeError: undefined is not a function in datepicker参照で始まります

StackOverflowの回答があると、moment.jsはjQuery UIの上にあるはずですが、変更がありませんでした。助けてください!

答えて

2

答えは簡単です。jquery-ui.cssへの参照を追加していません。そのうまく動作しますが、styles/CSSは適用されません。

this answer

+1

に言及リンクを介してCSSのそれぞれのバージョンを取得するには、コーディングハッピー..後半responce –

+0

ネヴァ心のために申し訳ありませんが、そんなにありがとう.. :) –

関連する問題