add calendar search

This commit is contained in:
2022-11-15 10:45:49 +03:00
parent 73df506096
commit 41c8187b41
3 changed files with 8 additions and 4 deletions

View File

@@ -10,7 +10,7 @@
<?if (defined('TESTMODE') and TESTMODE == 1):?>
<link rel="stylesheet" href="<?php echo get_template_directory_uri();?>/style-test.css?ver=3">
<?else:?>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=325">
<link rel="stylesheet" href="<?php echo get_stylesheet_uri();?>?ver=326">
<?endif?>
<link href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" rel="stylesheet">
<!--<link href="<?php echo get_stylesheet_directory_uri()?>/pub/fontawesome.css" rel="stylesheet">-->

View File

@@ -178,7 +178,7 @@ endif;
<option value="tag"<?if ($active_tag):?> selected<?endif?>>Теги</option>
</select>
<div id="search-calendar" style="visibility: <?if($_GET['search_date'] == 'range'):?>visible<?else:?>hidden<?endif?>;">
<div id="search-calendar" style="display: <?if($_GET['search_date'] == 'range'):?>block<?else:?>none<?endif?>;">
<input id="search-start-date" name="search-start-date" type="date" value = "<?if (isset($_GET['search-start-date']) and $_GET['search-start-date'] !== '' ):?><?=$_GET['search-start-date']?><?else:?><?=date('Y-m-d')?><?endif?>">
-
<input id="search-end-date" name="search-end-date" value = "<?if (isset($_GET['search-end-date']) and $_GET['search-end-date'] !== ''):?><?=$_GET['search-end-date']?><?else:?><?=date('Y-m-d')?><?endif?>" type="date">
@@ -243,8 +243,11 @@ get_template_part( '/blocks/paginator');?>
search_date_select.addEventListener('change', function() {
if (search_date_select.selectedIndex == 4) {
data_range_panel.style.visibility = "visible";
}
data_range_panel.style.display = 'block';
}
else {
data_range_panel.style.display = 'none';
}
})

View File

@@ -289,6 +289,7 @@ a{
#search-calendar{
margin-top: 18px;
display: none;
}
.search-select-type{