Kendo UI:Grid中单元格日期格式化
2014-11-27 15:00
232 查看
Grid中怎么格式化时间类型数据?
解决方案
(1)使用format格式化
{
field: "updateTime",
title: "更新时间",
width: 200,
format: "{0: yyyy-MM-dd HH:mm:ss}"
}
(2)使用template实现
{
field: "updateTime",
title: "更新时间",
width: 200,
template : kendo.template($("#updatetime_template").html())
}
<script type="text/x-kendo-template" id="updatetime_template">
#= kendo.toString(updateTime, "yyyy-MM-dd HH:mm:ss") #
</script>
note:其实不止以上两种解决方案,具体可查看kendoapi文档,standardnumber
format, custom number format, standard date format or a customdate format.
包含格式化number(美元符号,百分号,float类型等)和date。
解决方案
(1)使用format格式化
{
field: "updateTime",
title: "更新时间",
width: 200,
format: "{0: yyyy-MM-dd HH:mm:ss}"
}
(2)使用template实现
{
field: "updateTime",
title: "更新时间",
width: 200,
template : kendo.template($("#updatetime_template").html())
}
<script type="text/x-kendo-template" id="updatetime_template">
#= kendo.toString(updateTime, "yyyy-MM-dd HH:mm:ss") #
</script>
note:其实不止以上两种解决方案,具体可查看kendoapi文档,standardnumber
format, custom number format, standard date format or a customdate format.
包含格式化number(美元符号,百分号,float类型等)和date。
相关文章推荐
- Kendo UI:Grid中单元格日期格式化
- dev gridcontrol 绑定int型及日期型的列默认当值为0时显示空白及格式化日期显示方式
- Extjs怎么格式化Grid的日期列
- Kendo UI:Grid中单元格为下拉框/时间控件等
- devexpress.xtragrid.views.grid.gridview 格式化单元格
- Ext.Net 中的GridPanle列中日期进行格式化
- 新增格式化单元格数据功能-dotNetFlexGrid更新1.24版本,快速的设置您的表格数据的不同样式;现在开始扔掉你的Asp.net GridView吧。
- POI Excel 01之新建Excel,创建工作簿,格式化单元格日期
- Ext gridPanel 日期格式化
- Kendo UI:Grid中单元格的数据源的设置-field选择域的问题
- 格式化grid日期
- Kendo UI:Grid中单元格样式控制
- Extjs怎么格式化Grid的日期列
- javascript Date format(js日期格式化)
- (转)JS 中如何将字符串转化成日期&&日期格式化方法
- format方法格式化Date时间日期
- python日期时间转为字符串或者格式化输出的实例
- c++builder通过指定的分隔符格式化一个日期字符串
- EasyUI TreeGrid编辑单元格的点击事件和赋值
- java 日期格式化帮助类