MVC4 DateTimePicker找不到图标时间和图标日历

我使用此链接中的 DateTime选择器来获取用户的日期和时间。 我正在使用bootstrap。 这是我的代码:

Data e Hora Inícial do Gráfico
Data e Hora Final do Gráfico
$(function () { $('#startDateTimePicker').datetimepicker({ language: 'pt-BR' }); $('#endDateTimePicker').datetimepicker({ language: 'pt-BR' }); $("#endDateTimePicker").data('datetimepicker').setLocalDate(now); $("#startDateTimePicker").data('datetimepicker').setLocalDate(oneHourAgo); });

运行系统时不显示图标日期和图标时间。 我不知道在哪里找到那些。

有人可以帮我在屏幕上显示这些图标吗?

这个插件选择日期和时间有更好的选择吗? 我发现只有几个日期或时间的实现,但两者都没有。

谢谢。

看起来您正在使用Bootstrap 2.3.2图标 。 按照以下步骤在您的项目上设置Bootstrap 2.3.2: http : //getbootstrap.com/2.3.2/getting-started.html

我想向您推荐3.0版本的Bootstrap。 在3.0中,图标的使用情况发生了一些变化: http : //getbootstrap.com/components/#glyphicons

版本2.3.2:

  

版本3.0:

  

查看此示例以解决您的问题。

  1. 打开BundleConfig.cs并修改样式包“〜/ Content / themes / base / css”,如下所示:

bundles.Add(new StyleBundle(“〜/ Content / themes / base / css”)。Include(“〜/ Content / themes / base / jquery-ui.css”,“〜/ Content / themes / base / jquery-ui .all.css“));

  1. 打开_layout.cs并在结束标记之前添加以下内容

@ Scripts.Render(“〜/ bundles / jquery”)@ Scripts.Render(“〜/ bundles / jqueryui”)@ Styles.Render(“〜/ Content / themes / base / css”)@RenderSection(“scripts”,必填:false)

  1. 最后,为了测试你的视图,打开index.cshtml并在最后添加它

日期:

 @section Scripts{ @*@Scripts.Render("~/bundles/jqueryval")*@  } 

如果有任何疑问,请告诉我。

干杯