2

我的日期格式Jqgrid显示为NaN/NaN/NaN.I want to make it as dd/mm/yyyy。我想为此做哪些必要的更正。

我的代码是

jQuery("#jsonmap").jqGrid
    (
    {
        url: 'Edit.aspx',
        datatype: 'json',
        mtype:'GET',

        align:"center",
        colNames: ['empID', 'empName','Dob'],
        colModel: [{
                name: 'empID',
                index: 'empID',
                width: 150,
                key:true,
                editable: false,
                align:"center",
                editoptions: {
                readonly: true,
                sorttype:'int',

                search:true,
                size: 100
            }},                
            {
                name: 'empName',
                index: 'empName',
                width: 150,
                sortable:true,
                align: "center",
                editable: true,
                size: 100
              },


            {
                name: 'Dob',
                index: 'Dob',

                align: "center",

                sorttype:'Dob',
                formatter: 'date',
                 datefmt: 'dd/mm/yyyy',
                 editable: true,
                  edittype: 'text',
                  editrules: { required: true, date: true },
                 formoptions: { elmsuffix: ' *'} 




      },
4

1 回答 1

0

NaN== Not-a-Number ...您很可能在某处进行了错误的计算或 div-by-zero ?

于 2012-10-16T06:04:13.727 回答