title: Data in string format sorting as per duration using javascript
body: <p>I have certain data in the form of number of lines containing string. Each line contains date. I want to sort the data for certain duration. e.g. from 12th DEC 2012 to 23rd March 2013. This is supposed to done using javascript and jquery. 
  I have done following code.</p>
  
  <pre><code>for (TempDate = strFrom; TempDate &lt;= strTo; TempDate.setDate(TempDate.getDate() + 1)) {
      var FromDate = $.datepicker.formatDate('yy-mm-dd', strFrom);
      alert("FromDate : " + FromDate);    
      if (temp1[i].indexOf(FromDate) &gt; 0) {
          $('#BasicDetailsPlaceHolderPanel div:eq(' + i + ')').css({ 'display': 'block'});
      }
      else {
          $('#BasicDetailsPlaceHolderPanel div:eq(' + i + ')').css({ 'display': 'none'});
      }
  }
  </code></pre>
  
  <p>But it is showing the records of last date only.
  Please tell me solution.</p>