Jquery search between two dates

Jquery search between two dates

I have problem with Jquery searching between two dates.
If I search like this:
18/02/16 - 30/05/16
I can find files which is between them.
My problem is that im searching it like filename because file date is in filename. (When file is created)

My directory tree:


  1. function DirTree(title, ajaxcall, post_action){
        
        $('#big_modal-2').html(' ');

        var output = '<p class="lead text-search-info">'+title+'</p>';
        output += '<hr />';
        
        output += '<p id="dir-links" class="lead"><?php echo lang::get("please wait...")?></p>';
        output += '<p id="dir-links-backup" style="display:none"></p>';

        output += '<hr /><div class="col-lg-5 right"><div class="input-group"><input type="text" class="form-control" id="text-search" placeholder="<?php echo lang::get("Search")?>" />';
            output += '<span class="input-group-btn"><button style="padding: 7.5px 12px;" class="btn btn-default" id="otsing" type="button"><i class="fa fa-search"></i></button></span></div></div>';
        output += '<div class="row"><div style="float:left; width:17%;"><input type="text" style="height:37px;" class="form-control" id="startDate" placeholder="DD/MM/YY"></div> <div style="float:left; width:17%; margin:0 1%;"><div class="input-group"><input type="text" style="width:97.71px; height:37px;" class="form-control" id="endDate" placeholder="DD/MM/YY" /><span class="input-group-btn"><button style="padding: 7.5px 12px; left:-1px;" class="btn btn-default" id="dateOtsing" type="button"><i class="fa fa-search"></i></button></span></div></div></div>';

        output += '<a class="close-reveal-modal"></a>';
        
        $('#big_modal-2').append(output);
        $('#big_modal-2').reveal();

        $.get('<?php echo index::get('baseurl')?>'+ajaxcall, function(data) {
                $('#dir-links').html(data);
                $('#dir-links-backup').html(data);
                bindTreeLinks(post_action);
        });

        jQuery.expr[':'].Contains = jQuery.expr.createPseudo(function(arg) {
          return function( elem ) {
            return ( elem.textContent || elem.innerText || getText( elem ) ).toUpperCase().indexOf(arg.toUpperCase()) >= 0;
              };
        });

        $('#dateOtsing').click(function(){ //Date search not working..
      var startDate = $('#startDate').val();
      var endDate = $('#endDate').val();
            var backup =  $('#dir-links-backup').html();
            $('#dir-links').html(backup);
        if (from <= startDate && to >= endDate) {
                var match = $("#dir-links li:Contains('"+startDate+"', '"+endDate+"')");
                $(match).each(function(){
                    $(this).find("li:not(:Contains('"+startDate+"', '"+endDate+"'))").remove();
                });
                match = $(match).first();
                if ($(match).length == 0){
                    $('#dir-links').html('<p><?php echo lang::get("nothing found...")?></p>');
                    return;
                }
                var html = $('<div>').append($(match).clone()).remove().html();
                $('#dir-links').html(html);
            }
            bindTreeLinks(post_action);
      });
Can someone help me with that?