I am doing a filtering in a list and I would like to include the calendar with the possibility of selecting a range of dates as the daterangepicker provides in the column on the left as I show you below.
I have not found any option to keep the calendar static in this column, it always depends on a drop-down or an input that opens the calendar. I've seen this link where it appears static hanging from an input " link " but it's not what I'm looking for.
I have seen other plugins like datepicker with which I can keep the calendar static but it does not give me the option to select a range of dates.
Can anyone tell me if there is a plugin with which I can select a date range and put the calendar as it appears in the example that I have attached?
Thank you very much in advance.
[UPDATE]
I enclose my code and the test I have done with David's suggestion:
<a class="btn btn-primary filter-date-picker">
Fecha
</a>
<div class="calendar-box"></div>
And here the javascript code:
$(document).ready(function(){
$('.filter-date-picker').daterangepicker({
"locale": {
"format": "DD/MM/YYYY",
"separator": " - ",
"applyLabel": "Aplicar",
"cancelLabel": "Cancelar",
"fromLabel": "Desde",
"toLabel": "Hasta",
"customRangeLabel": "Custom",
"daysOfWeek": [
"Lu",
"Ma",
"Mi",
"Ju",
"Vi",
"Sa",
"Do"
],
"monthNames": [
"Enero",
"Febrero",
"Marzo",
"Abril",
"Mayo",
"Junio",
"Julio",
"Agosto",
"Septiembre",
"Octubre",
"Noviembre",
"Diciembre"
],
"firstDay": 0
},
// opens: 'left'
}, function(start, end, label) {
$(".filter-date-picker").html(start.format('DD-MM-YYYY')+" <i class='fas fa-minus'></i> "+end.format('DD-MM-YYYY'));
});
$(".filter-date-picker").toggle(function() {
$(".calendar-box").datepicker("show");
}, function() {
$(".calendar-box").datepicker("hide");
});
The fact is that after implementing this, directly the div "filter-date-picker" disappears.