本文介绍了Grid.MVC日期过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我绑定到一个grid.MVC模型,所有其他过滤器工作正常,除了日期选择器的过滤器。
我已经加入了grid.mvc.datepicker.css的包和我收到的日期选择器。
有任何的JS的所有js文件加载正确
没有错误,这是我在视图中启动栏
columns.Add(O = GT; o.VoucherType.Expiry)
.Titled(到期)
.SetFilterWidgetType()
.Format({0:DD / MM / YYYY});
解决方案
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日期过滤器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!