将代码修改如下:
- { name: "birthday", displayName: "Birthday", formatter: 'yyyy/MM/dd',
- value: function(row,value) {
- if (arguments.length === 1) {
- //getValue
- if(row.birthday != null) {
- return new Date(row.birthday);
- }else {
- return null;
- }
- } else {
- debugger;
- //setValue
- if(!arguments[1]) {
- row.birthday = null;
- }
- row.birthday = fromOADate(value).valueOf();
- }
- }
- },
复制代码 完整代码见附件。
|
|