我正在尝试为生日创建一个日期时间选择器,您可以see here https://stackoverflow.com/questions/34271030/change-language-to-bootstrap-datetimepicker,该解决方案需要使用许多链接和脚本源。
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/css/bootstrap-datetimepicker.min.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/moment.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.6/locale/es.js"></script>
<br>
<div class="form-group">
<div class='input-group date datepicker' name="datepicker" >
<input type='text' class="form-control placementT" id="fecha">
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar">
</span>
</span>
</div>
我想使用 mvc 捆绑包,其中包含指向这些脚本和样式表的链接。但我找到的解决方案:如何在 ASP.NET MVC 中使用 CDN 设置捆绑包? http://www.siddharthpandey.net/setup-bundles-using-cdn-in-asp-net-mvc/没有解释如何在捆绑包中包含许多链接。相反,每个包使用一个链接:
bundles.Add(new ScriptBundle("~/bundles/jquery", "http://code.jquery.com/jquery-2.0.3.min.js")
.Include("~/Scripts/jquery-{version}.js"));
bundles.Add(new StyleBundle("~/bundles/bootstrap", "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css")
.Include("~/Content/bootstrap.css"));
如您所见,我必须添加 6 个不同的捆绑包。我希望能够做这样的事情:
bundles.Add(....,"https://maxcdn","https link","another link")
我该怎么做 ?我想将该包包含在我的视图中,如下所示:
@Scripts.Render("~/bundles/myCustomBundle")