<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Datagrid-Dateformat Demo</title>
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css">
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="http://www.jeasyui.com/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="easyuiExtension.js"></script>
<script type="text/javascript">
$(function () {
var testDataStr = "[{id:1,name:'苹果',price:5,date:'\/Date(1419264000000)\/',date2:'\/Date(1419264000000)\/'},{id:2,name:'香蕉',price:3,date:'/Date(1419564000000)/',date2:'/Date(1419564000000)/'} "
+ ",{id:3,name:'雪梨',price:3,date:'/Date(1419864000000)/',date2:'/Date(1419864000000)/'},{id:4,name:'葡萄',price:8,date:'\/Date(1417264000000)\/',date2:'\/Date(1417264000000)\/'}]";
var testData = eval(testDataStr);
$('#dg').datagrid({
data: testData,
width: 600,
height: 350,
columns: [[
{ title: '编号', field: 'id', width: 80 },
{ title: '名称', field: 'name', width: 100,editor:'text' },
{ title: '单价', field: 'price', width: 80 ,editor:'text'},
{ title: '进货日期', field: 'date', width: 120, editor: 'datebox', formatter:formatDatebox},
{ title: '进货日期(带时间)', field: 'date2', width: 150, editor: 'datetimebox', formatter: formatDateBoxFull}
]],
onClickRow: function (rIndex, rData) {
var preIndex = $(this).data('PreIndex');
if (preIndex != undefined && preIndex > -1) {
$(this).datagrid('endEdit', preIndex);
}
$(this).datagrid('beginEdit', rIndex);
$(this).data('PreIndex', rIndex);
}
});
});
</script>
</head>
<body>
<h2>Datagrid-Dateformat Demo</h2>
<div id="dg">
</div>
</body>
</html>

idoiknow
- 粉丝: 9
最新资源
- 科技平台如何借助AI+数智应用解决资源丰富度和可持续发展问题?.docx
- 科技平台如何借助AI+数智应用解决资源匮乏与服务低效的问题?.docx
- 科技平台如何借助AI+数智应用实现可持续发展,避免陷入“资源有余而活力不足”的困境?.docx
- 科技平台如何利用AI+数智应用工具提升服务价值和市场竞争力?.docx
- 科技平台如何通过AI+数智应用解决资源整合难题?.docx
- 科技平台运营模式创新有哪些AI+数智应用关键要素?.docx
- 科技市场化过程中,如何通过AI+数智应用有效整合资源以提升平台竞争力?.docx
- 科技市场化中,如何通过AI+数智应用应对技术转移过程中的挑战?.docx
- 科技项目创新管理中如何通过AI+数智应用高效整合多维度资源,解决平台资源匮乏问题?.docx
- 科技资源管理平台的三大核心问题是什么?如何通过AI+数智应用工具有效解决?.docx
- 科技资源管理平台如何通过AI+数智应用实现可持续发展?.docx
- 面对复杂的技术转移服务需求,如何通过AI+数智应用构建更智能高效的服务体系?.docx
- 面对技术引进合作分析的需求,AI+数智应用科技创新平台应如何高效应对?.docx
- 面对科技服务平台服务效能不足的问题,如何借助AI+数智应用科技创新助力提升服务专业性和效率?.docx
- 企业科技创新服务平台如何通过AI+数智应用保障服务质量与专业性?.docx
- 企业科技创新服务平台如何借助AI+数智应用解决科技资源匮乏与信息不对称问题?.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



- 1
- 2
- 3
- 4
- 5
- 6
前往页