title: Date sort on click of dojo grid header
body: <p>I am trying to sort date in the dojo grid. But the sorting is not happening properly, it considers date as string and sorting doesn't work. Is there anyway that would help me?</p>
  
  <p>My date format: <code>EE MMM dd yyyy HH:mm:ss z</code></p>
  
  <p>My code:</p>
  
  <pre><code>myStore =  new ItemFileWriteStore({ 
      data:storeData
  });
  myStore.comparatorMap = {};
  
  myStore.comparatorMap["scan_date"] = function(a,b){
      var af = dojo.date.locale.parse(a,{datePattern:"dd/MM/yyyy hh:mm:ss",selector:"date"});
      var bf = dojo.date.locale.parse(b,{datePattern:"dd/MM/yyyy hh:mm:ss",selector:"date"});
  
      var c = dojo.date.compare(af, bf);
      return c;
  }
  // myStore.comparatorMap = {};
  // myStore =  new ObjectStore({ objectStore:new Memory({ data: data }) });
  grid = new DataGrid({
      store: myStore,
      query: { id: "*" },
      queryOptions: {},
      structure: [
          { type: "dojox.grid._RadioSelector" },
          [
              // {name:'S.No.', field: 'Id', width: '47px'},
              {name:"Client Name",field:"client_name",width: "auto"},
              {name:"Contractor Name",field:"contractor_name",width: "auto"},
              {name:"Barcode Number",field:"barcode_number",width: "auto"},
              {name:"Replacement Seal Number",field:"container_number",width: "auto"},
              {name:"Container Number",field:"container_no",width: "auto"},
              {name:"Address",field:"address",width: "auto"},
              {name:"Scan Date &amp; Time",field:"scan_date",datatype:"date",width: "auto",formatter:formatDate},
              {name:"Contractor Remarks",field:"contractor_remarks",width: "auto"}
          ]
      ]
      }, "grid");
      grid.startup();
  });
  </code></pre>