Доработка календаря

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2021-07-28 13:41:21 +10:00
parent 49ed9bf59e
commit b80b887a11
2 changed files with 17 additions and 2 deletions

View File

@ -188,13 +188,13 @@ if (
<a class="btn btn-sm button_white button_clean mb-0 mr-2" type="button" onclick="return orders_read('last',' '<?= time() - 31536000 ?>', '<?= time() ?>');">Год</a>
</small>
<div class="ml-2 mr-3 d-flex">
<div class="form-control form-control-sm form_control_clean px-1 py-0 d-flex">
<div class="form-control form-control-sm form_control_clean px-0 py-0 d-flex">
<input id="orders_period_calendar_from" class="ml-auto" type="date" value="<?= $from ?? date('Y-m-d', time() - 604800) ?>" onchange="return orders_read('last', moment(this.value, 'YYYY-MM-DD').unix(), moment(document.getElementById('orders_period_calendar_to').value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
<i class="far fa-calendar-alt my-auto mr-auto"></i>
</div>
<p class="mx-2 p-0">-</p>
<div class="form-control form-control-sm form_control_clean px-1 py-0 d-flex">
<div class="form-control form-control-sm form_control_clean px-0 py-0 d-flex">
<input id="orders_period_calendar_to" class="ml-auto" type="date" value="<?= $to ?? date('Y-m-d', time()) ?>" onchange="return orders_read('last', moment(document.getElementById('orders_period_calendar_from').value, 'YYYY-MM-DD').unix(), moment(this.value, 'YYYY-MM-DD').unix());" pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}" />
<i class="far fa-calendar-alt my-auto mr-auto"></i>
</div>

View File

@ -43,6 +43,8 @@
#page_orders article input[type="date"] {
margin-right: -10%;
width: 75%;
text-align: right;
font-size: 1rem;
outline: none;
border: none;
@ -56,3 +58,16 @@
-moz-box-shadow: 0px 0px 0px 10px rgba(255, 255, 255, 1);
box-shadow: 0px 0px 0px 7px rgb(255 255 255);
}
#page_orders article input[type=date]::-webkit-calendar-picker-indicator {
margin-left: 0;
opacity: 0;
}
#page_orders article input[type=date]::-webkit-datetime-edit {
background-color: red;
}
#page_orders article input[type=date]::-webkit-datetime-edit-fields-wrapper {
background: silver;
}