jquery datetimepicker 没有在日历周围显示漂亮的格式框
jquery datetimepicker not showing nice formatting box around the calendar
我已经为此工作了几个小时。 CSS 似乎不起作用,但我不知道为什么。我已将其包含在捆绑包中,
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-1.12.1.js",
"~/Scripts/jquery-ui-timepicker-addon.js",
"~/Scripts/Scott.js"
));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at https://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"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/jquery-ui-timepicker-addon.css",
"~/Content/site.css"));
}
并且我已经在 _layout 页面中呈现了它。
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</head>
然而,当我 运行 程序并单击日期时间字段时,它看起来像这样:
是设置问题还是我出了什么问题?
谢谢您的帮助。
-斯科特。
原来我少了jquery-ui.css。一旦我添加了这个 css 文件,它就一切正常了。不知何故,当我添加 jQuery.UI.Combined 1.12.1 时它也没有添加 css 文件。
我已经为此工作了几个小时。 CSS 似乎不起作用,但我不知道为什么。我已将其包含在捆绑包中,
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery-ui-1.12.1.js",
"~/Scripts/jquery-ui-timepicker-addon.js",
"~/Scripts/Scott.js"
));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.validate*"));
// Use the development version of Modernizr to develop with and learn from. Then, when you're
// ready for production, use the build tool at https://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"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/jquery-ui-timepicker-addon.css",
"~/Content/site.css"));
}
并且我已经在 _layout 页面中呈现了它。
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewBag.Title - My ASP.NET Application</title>
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/modernizr")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/bootstrap")
@RenderSection("scripts", required: false)
</head>
然而,当我 运行 程序并单击日期时间字段时,它看起来像这样:
是设置问题还是我出了什么问题? 谢谢您的帮助。 -斯科特。
原来我少了jquery-ui.css。一旦我添加了这个 css 文件,它就一切正常了。不知何故,当我添加 jQuery.UI.Combined 1.12.1 时它也没有添加 css 文件。