Author Topic: Date not displayed in IE version 10 and 11  (Read 1858 times)

TeeJT

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Date not displayed in IE version 10 and 11
« on: August 17, 2017, 02:35:56 pm »
I am using your demo example at https://paramquery.com/pro/demos/showhide_columns
This demo displays the date in Chrome but not IE. I have clients that still use IE and I am forced to support them.

This is my script:
Code: [Select]

    $(function () {

var data = [
{
DEMAS_DCONFIRM: "",
DEMAS_DEMAS_CNAMESHORT: "Employee B1732",
DEMAS_DEMAS_CNOEESHORT: "B1732",
DEMAS_DHIRE: "2002-05-01 00:00:00",
DSERVICE_DSERVICE_CDEPARTMEN_L: "OPR"
},
{
DEMAS_DCONFIRM: "2004-07-11 00:00:00",
DEMAS_DEMAS_CNAMESHORT: "Employee B1732",
DEMAS_DEMAS_CNOEESHORT: "B1732",
DEMAS_DHIRE: "2002-05-01 00:00:00",
DSERVICE_DSERVICE_CDEPARTMEN_L: "OPR"
}
];


var grid = $("div#grid_showhide_columns");
grid.pqGrid({
dataModel: { data: data },
"colModel":[
{"width":95,"dataIndx":"DSERVICE_DSERVICE_CDEPARTMEN_L","hidden":true, title:"Dept"},
{"width":95,"dataIndx":"DEMAS_DEMAS_CNOEESHORT","hidden":false, title:"Emp. No"},
{"width":374,"dataIndx":"DEMAS_DEMAS_CNAMESHORT","hidden":false, title:"Name"},
{"width":125,"dataIndx":"DEMAS_DHIRE","hidden":false, title:"Hire Date", dataType: "date", format: "dd/M/yy"},
{"width":125,"dataIndx":"DEMAS_DCONFIRM","hidden":false, title:"Confirm Date", dataType: "date", format: "dd/M/yy"}
],
"height":600,
"width":"100%",
"groupModel":{"dataIndx":["DSERVICE_DSERVICE_CDEPARTMEN_L"],"dir":[],"collapsed":[false],"grandSummary":false},
"pageModel":{"rPP":100,"curPage":1},
"sortModel":{"sorter":[{"dataIndx":"DSERVICE_DSERVICE_CDEPARTMEN_L","dir":"up"}]},
"freezeRows":0,
"freezeCols":0
});
 
    });


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Date not displayed in IE version 10 and 11
« Reply #1 on: August 17, 2017, 03:34:26 pm »
datetime values are not in standard format in your code.

Please add T between date and time part.

"2002-05-01T00:00:00"

TeeJT

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 88
    • View Profile
Re: Date not displayed in IE version 10 and 11
« Reply #2 on: August 17, 2017, 03:52:14 pm »
Thanks for the prompt reply.