Leaflet Slider and Marker Cluster - time not sorted
<p>I use leaflet markercluster along with the ui slider (modified so it can handle a markercluster group as a entry layer, see <a href="https://stackoverflow.com/questions/32886588/how-to-use-leaflet-slider-along-with-markercluster-in-javascript">How to use leaflet slider along with markercluster in Javascript?</a>). </p>

<p>I managed to make it work except "time" is not sorted in my slider. I don't know what rule SliderControl.js follows to sort the markers but it seems random to me. My data variable (Data_GL) is well time sorted and I specified "timeStrLength: 10" in SliderControl.js.</p>

<p>Here's my code :</p>

<pre><code>var sliderControl = null;

var map = L.map('map').setView([23, 2], 3);
map.options.maxZoom=13;

var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
var osmAttrib='Map data &amp;copy; OpenStreetMap contributors';
L.tileLayer(osmUrl, {attribution: osmAttrib, id: 'mapbox.streets'}).addTo(map);

var markers = L.markerClusterGroup();
markers.addTo(map);

//Filling layer
var mapdata=Data_GL;

for (var i = 0; i &lt; mapdata.length; i++) {
  var marker = L.marker([mapdata[i].latitude,mapdata[i].longitude],{title: mapdata[i].Platform,icon: cssic0,time: mapdata[i].time});
  marker.bindPopup(mapdata[i].Platform + "&lt;br&gt;&lt;b&gt;Type &lt;/b&gt;: " + mapdata[i].mtype + "&lt;br&gt;&lt;b&gt;Last Update &lt;/b&gt;: " + mapdata[i].time);
  console.log(marker.time);
  marker.addTo(markers);};

//Slider
var sliderControl = L.control.sliderControl({layer:markers , range:true});
map.addControl(sliderControl);

sliderControl.startSlider();
</code></pre>

<p>Data_GL looks like that :</p>

<pre><code>var Data_GL = [
{"latitude":37.783380,"longitude":15.956680,"mtype":"GL","Platform":"61283","time":"2005-02-21"}, 
{"latitude":37.864970,"longitude":15.826730,"mtype":"GL","Platform":"61282","time":"2005-02-25"}, 
{"latitude":47.639170,"longitude":-8.469670,"mtype":"GL","Platform":"62595","time":"2006-03-12"}, 
{"latitude":59.562670,"longitude":-39.745000,"mtype":"GL","Platform":"64556","time":"2006-08-24"},
...
</code></pre>

<p>I tried this solution (<a href="http://jsfiddle.net/nathansnider/ngeLm8c0/4/" rel="nofollow noreferrer">http://jsfiddle.net/nathansnider/ngeLm8c0/4/</a>) but I don't really know how to apply it to a markercluster group.</p>