Author Topic: Sorting/Filtering of Dates Within IE/Firefox Do Not Work  (Read 3794 times)

tcf

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 13
    • View Profile
Sorting/Filtering of Dates Within IE/Firefox Do Not Work
« on: April 29, 2016, 07:01:45 pm »
I've hot noticed a serious problem with Dates... I was doing all my testing in Chrome and everything worked great.

But then I did some testing in IE11 and I noticed that Dates would not sort when I clicked the header like they did in Chrome. I also tried filtering and this is the same it works in Chrome but not IE.

I've also tried Firefox and this has he same problem.

Please can you confirm if there is a problem with IE/Firefox when it comes to sorting Dates?

Thanks

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Sorting/Filtering of Dates Within IE/Firefox Do Not Work
« Reply #1 on: April 29, 2016, 08:54:53 pm »
Sorting and filtering of dates works fine in IE and Firefox.

http://paramquery.com/pro/demos/sorting

http://paramquery.com/pro/demos/filter_header_local
« Last Edit: April 29, 2016, 08:59:58 pm by paramquery »

tcf

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Sorting/Filtering of Dates Within IE/Firefox Do Not Work
« Reply #2 on: April 29, 2016, 09:52:48 pm »
OK this as it is does work in IE:
http://paramquery.com/pro/demos/sorting

But if I simplify it to use local data then the dates do not sort in IE but are OK in Chrome...


    $(function () {

      var data = [['Argentina', 'Yvonne Moncada', '2016-12-12 12:23:01', '2016-12-12 12:23:01', '2016-12-12 12:23:01'],
            ['Argentina2', 'Yvonne Moncada2', '2015-12-12 12:23:01', '2015-12-12 12:23:01', '2015-12-12 12:23:01']];
      
        var colM = [
            { title: "ShipCountry", width: 100, dataType: "string" },
            { title: "Customer Name", width: 130, dataType: "string" },
          { title: "Order Date", width: 100, dataType: "date" },
          { title: "Required Date", width: 100,  dataType: "date" },
          { title: "Shipped Date", width: 100, dataType: "date" }
      ];
        var dataModel = { data: data };
       
        var $grid = $("#grid_local_sorting").pqGrid({
            dataModel: dataModel,
            sortModel: {
                single: true,
                space: true,
                multiKey: null
            },
            numberCell: { resizable: true, title: "#", minWidth: 20, width: 30 },
            colModel: colM,
            pageModel: { type: 'local', rPP: 100, rPPOptions:[10,100,1000] },
            showTitle: false,
            columnBorders: false,
            resizable: true,                       
            hwrap: false,
            wrap: false
        });
    });

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: Sorting/Filtering of Dates Within IE/Firefox Do Not Work
« Reply #3 on: April 29, 2016, 10:25:06 pm »
'2016-12-12 12:23:01' is non-standard format and is not supported by all browsers.

Please add T between date and time to make it valid ISO 8601 format: '2016-12-12T12:23:01'

tcf

  • Pro Deluxe
  • Newbie
  • *
  • Posts: 13
    • View Profile
Re: Sorting/Filtering of Dates Within IE/Firefox Do Not Work
« Reply #4 on: April 29, 2016, 10:47:37 pm »
Thank you so much that worked perfectly... :-)