I Want add to my website date range search.
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:
HTML:
<div class="row"> <div style="float:left; width:17%;"> <input type="text" style="height:37px;" id="minDate" class="form-control" 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; id="maxDate" height:37px;" class="form-control" placeholder="DD/MM/YY" /> <span class="input-group-btn"> <button style="padding: 7.5px 12px; left:-1px;" class="btn btn-default" id="DateSearch" type="button"><i class="fa fa-search"></i></button> </span> </div> </div> </div>
Jquery:
Didnt find any like filename date search..
Default file search HTML:
<div class="col-lg-5 right">
<div class="input-group">
<input type="text" class="form-control" id="text-search" placeholder="<?php echo keel::get("Otsi ja filtreeri")?>" />
<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>
But my Default file search JQUERY:
$('#otsing').click(function(){
var searchTerm = $('#text-search').val().replace("/", "_").replace(" ", "_");
var backup = $('#dir-links-backup').html();
$('#dir-links').html(backup);
if (searchTerm) {
var match = $("#dir-links li:Contains('"+searchTerm+"')");
$(match).each(function(){
$(this).find("li:not(:Contains('"+searchTerm+"'))").remove();
});
match = $(match).first();
if ($(match).length == 0){
$('#dir-links').html('<p><?php echo keel::get("Vastet ei leitud...")?></p>');
return;
}
var html = $('<div>').append($(match).clone()).remove().html();
$('#dir-links').html(html);
}
bindTreeLinks(post_action);
});
$('#text-search').keypress(function(e){
if(e.which == 13){//Enter key pressed
$('#otsing').click();//Trigger search button click event
}
});
I found only date picker plugins or date range plugins or DataTable plugins but These are not that what I need.
I need to search like file but by Date..
Maybe some smarter can help me out.
Best wishes

New Topic/Question
Reply


MultiQuote



|