fix custom date
This commit is contained in:
parent
44a097630e
commit
c5d6d90703
1 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<button class="outline" onclick="doFilters()">Show the events!</button>
|
<button onclick="doFilters()">Show the events!</button>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<script>
|
<script>
|
||||||
function noClear(e){
|
function noClear(e){
|
||||||
|
@ -42,7 +42,7 @@ function noClear(e){
|
||||||
}
|
}
|
||||||
function doFilters(){
|
function doFilters(){
|
||||||
d=document.querySelector('input[type="radio"]:checked').id;
|
d=document.querySelector('input[type="radio"]:checked').id;
|
||||||
if(d=="custom"){document.querySelector('input[type="date"]').value}
|
if(d=="custom"){d=document.querySelector('input[type="date"]').value}
|
||||||
f=Array.from(document.querySelectorAll('input[type="checkbox"]:checked')).map(c=>c.id);
|
f=Array.from(document.querySelectorAll('input[type="checkbox"]:checked')).map(c=>c.id);
|
||||||
f=f.length?"?"+f.join(","):"";
|
f=f.length?"?"+f.join(","):"";
|
||||||
document.location.href=d+f
|
document.location.href=d+f
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue