Grid.MVC日期过滤器

编程入门 行业动态 更新时间:2024-10-26 16:26:30
本文介绍了Grid.MVC日期过滤器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我绑定到一个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日期过滤器

本文发布于:2023-11-23 01:50:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619674.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:过滤器   日期   Grid   MVC

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!