对于2015年6月13日之后的所有日期,Kendo Grid Date为空 [英] Kendo Grid Date is null for 13/06/2015 all dates after 12
本文介绍了对于2015年6月13日之后的所有日期,Kendo Grid Date为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<pre lang="HTML">
@(Html.Kendo().Grid<IBATechnologies.IBA.Web.Models.AssetTransactionDetailViewModel>()
.Name("transactionGrid")
.Pageable()
//.Editable(editable=>editable.Mode(GridEditMode.InLine))
.Columns(colums =>
{
colums.Bound(p => p.assetCode).Width(100);
colums.Bound(p => p.assetDesc).Width(100);
colums.Bound(p => p.remark).Width(100);
colums.Bound(p => p.currencyCode).Width(100);
colums.Bound(p => p.rate).Width(100);
colums.Bound(p => p.currencyRate).Width(100);
colums.Bound(p => p.lcyAmount).Width(100);
colums.Bound(p => p.documentDate).Width(100);
colums.Command(command => { command.Destroy(); }).Width(100);
})
.ToolBar(toolbar => toolbar.Create())
.Editable(editable => editable.Mode(GridEditMode.InCell))
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(20)
.ServerOperation(false)
.Model(model => model.Id(p => p.assetCode))
.Create(update => update.Action("TransactionDoc_Create", "AssetTransaction"))
.Read(read => read.Action("TransactionDoc_Read", "AssetTransaction", new { docno = 0 }))
.Update(update => update.Action("BrandEditingPopup_Update", "AssetTransaction"))
.Destroy(update => update.Action("BrandEditingPopup_Destroy", "AssetTransaction"))
)
)
我的网格如上图所示,当我尝试编辑时,12之后的所有日期都返回为空。请帮我。 .................................................. .................................................. .........................................
My grid is shown above, when i try to edit, all the dates after 12 is return as null. Please help me. .............................................................................................................................................
推荐答案
你好
我想问题是,kendogrid将默认格式设为'mm-dd-yyyy'。如果是这样,如果mm大于12,它将返回null。
只需在指定日期格式后尝试。
Ex:
Hello
I guess the problem is that , kendogrid is taking the default format as 'mm-dd-yyyy'. If so there is a chance that , if mm is greater than 12 it will return null.
Just try after specifying the date format.
For Ex:
columns.Bound()
.Format("{0:dd-MMM-yyyy}")
(我不确定确切的语法)。
问候
Dominic Abraham
(I am not sure about the exact syntax).
Regards
Dominic Abraham
嘿
问题通过添加文化来解决。 :)谢谢
Hey
issue is solved by adding culture. :) thank you
</script>
<script>
kendo.culture("en-GB");
</script>
这篇关于对于2015年6月13日之后的所有日期,Kendo Grid Date为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文