我绑定到一个grid.MVC模型,所有其他过滤器工作正常,除了日期选择器的过滤器。
我已经加入了grid.mvc.datepicker.css的包和我收到的日期选择器。
有任何的JS的所有js文件加载正确
没有错误,这是我在视图中启动栏
columns.Add(O = GT; o.VoucherType.Expiry) .Titled(到期) .SetFilterWidgetType() .Format({0:DD / MM / YYYY});
当我点击日期,什么也没有发生电网。
解决方案问题是不是你已经忘记添加bootstrap.min.js或引导-datepicker.js 但是,你有没有添加CSS文件到_layout部分应用程序的
我有这个问题太,当我安装Grid.MVC的JavaScript得到了摆在正确的地方,但我忘了看在我的 /内容/文件夹并拖动 gridmvc。 datepicker.min.css 文件到我的_layout。之后我做了,它呈现的罚款。
我希望这能解决你的问题。
I have a model bound to grid.MVC, every other filter works fine apart from the date picker filter.
I have added the grid.mvc.datepicker.css to the bundle and I am getting the date picker.
There are no errors in any of the js and all the js files load properly
And this is how I initiate the column in the view
columns.Add(o => o.VoucherType.Expiry) .Titled("Expiry") .SetFilterWidgetType("") .Format("{0:dd/MM/yyyy}");
When I click on the date , nothing happens to the grid.
解决方案
The problem is not that you have forgotten to add the bootstrap.min.js or the bootstrap-datepicker.js but that you have not added the CSS file to the _Layout partial of your application.
I had this problem too, when I installed Grid.MVC the javascript got put in the right place, but I forgot to look in my /Content/ folder and drag the gridmvc.datepicker.min.css file onto my _Layout. After I did that it rendered fine.
I hope this solves your problem.
更多推荐
Grid.MVC日期过滤器
发布评论