date field iter1
This commit is contained in:
parent
cc1afe1afd
commit
89be0bfa05
@ -7,7 +7,6 @@
|
||||
height: 57px;
|
||||
padding-left: 16px;
|
||||
border-radius: 8px;
|
||||
|
||||
}
|
||||
|
||||
/*Шрифт*/
|
||||
@ -100,7 +99,7 @@ input[type=number]::-webkit-outer-spin-button {
|
||||
/*Позиционирование иконки*/
|
||||
.calendar-icon {
|
||||
position: absolute;
|
||||
right: -5px;
|
||||
right: 15px;
|
||||
top: 50%;
|
||||
pointer-events: none;
|
||||
font-size: 18px;
|
||||
|
||||
@ -2,9 +2,29 @@
|
||||
@import "colors.css";
|
||||
@import "inputs.css";
|
||||
|
||||
* {
|
||||
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.inputs {
|
||||
width: 500px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr
|
||||
}
|
||||
|
||||
@media screen and (max-width: 768px) {
|
||||
.inputs {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
23
index.html
23
index.html
@ -11,7 +11,7 @@
|
||||
<title>Библиотека UI компонентов</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style="display: grid; grid-template-columns: 1fr 1fr">
|
||||
<div class="grid">
|
||||
|
||||
<div class="input-fields">
|
||||
<h1>Поля ввода</h1>
|
||||
@ -27,7 +27,6 @@
|
||||
autocomplete="current-password">
|
||||
<label for="password" class="c-label passwordVisibilityToggle">Показать пароль</label>
|
||||
</div>
|
||||
<button type="submit" id="exampleSubmit">ввод</button>
|
||||
</form>
|
||||
<h2>Число</h2>
|
||||
<form class="inputs">
|
||||
@ -67,16 +66,18 @@
|
||||
</div>
|
||||
<script src="libs/flatpickr/flatpickr.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/flatpickr/dist/l10n/ru.js"></script>
|
||||
<script>
|
||||
flatpickr(".date-picker", {
|
||||
locale: "ru",
|
||||
dateFormat: "Y-m-d",
|
||||
monthSelectorType: "dropdown",
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
<script src="js/script.js"></script>
|
||||
<script src="js/showPassword.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
const fp = flatpickr(".date-picker", {
|
||||
dateFormat: "d.m.Y", // Формат даты
|
||||
locale: "ru", // Локализация на русский
|
||||
monthSelectorType: "dropdown", // Использование выпадающих списков для смены месяца
|
||||
yearSelectorType: "select", // Использование выпадающего списка для выбора года
|
||||
disableMobile: true
|
||||
});
|
||||
</script>
|
||||
<!--<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>-->
|
||||
<!--<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>-->
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
.flatpickr-calendar {
|
||||
font-family: Manrope sans-serif;
|
||||
font-family: Manrope, sans-serif;
|
||||
opacity: 0;
|
||||
display: none;
|
||||
text-align: center;
|
||||
@ -10,7 +10,7 @@
|
||||
direction: ltr;
|
||||
font-size: 14px;
|
||||
line-height: 24px;
|
||||
border-radius: 5px;
|
||||
border-radius: 12px;
|
||||
position: absolute;
|
||||
width: 307.875px;
|
||||
-webkit-box-sizing: border-box;
|
||||
@ -134,7 +134,7 @@
|
||||
|
||||
.flatpickr-calendar.arrowBottom:before,
|
||||
.flatpickr-calendar.arrowBottom:after {
|
||||
top: 100%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.flatpickr-calendar.arrowBottom:before {
|
||||
@ -162,7 +162,6 @@
|
||||
}
|
||||
|
||||
.flatpickr-months .flatpickr-month {
|
||||
background: #E7EFFF;
|
||||
color: #000;
|
||||
height: 34px;
|
||||
line-height: 1;
|
||||
@ -195,9 +194,10 @@
|
||||
color: #00133B;
|
||||
fill: #00133B;
|
||||
}
|
||||
|
||||
.flatpickr-prev-month svg,
|
||||
.flatpickr-next-month svg {
|
||||
stroke-width: 2px; /* Толщина линии стрелки */
|
||||
stroke-width: 1px; /* Толщина линии стрелки */
|
||||
width: 20px; /* Размер SVG */
|
||||
height: 20px; /* Размер SVG */
|
||||
}
|
||||
@ -207,6 +207,7 @@
|
||||
.flatpickr-next-month svg path {
|
||||
stroke: #000; /* Цвет стрелки */
|
||||
}
|
||||
|
||||
.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,
|
||||
.flatpickr-months .flatpickr-next-month.flatpickr-disabled {
|
||||
display: none;
|
||||
@ -352,12 +353,15 @@
|
||||
left: 12.5%;
|
||||
padding: 7.48px 0 0 0;
|
||||
height: 34px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
-webkit-transform: translate3d(0px, 0px, 0px);
|
||||
transform: translate3d(0px, 0px, 0px);
|
||||
}
|
||||
|
||||
.flatpickr-current-month {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.flatpickr-current-month span.cur-month {
|
||||
font-family: inherit;
|
||||
font-weight: 700;
|
||||
@ -394,10 +398,6 @@
|
||||
padding: 0 0 0 0.5ch;
|
||||
margin: 0;
|
||||
display: inline-block;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
font-weight: 300;
|
||||
line-height: inherit;
|
||||
height: auto;
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
@ -405,6 +405,13 @@
|
||||
-webkit-appearance: textfield;
|
||||
-moz-appearance: textfield;
|
||||
appearance: textfield;
|
||||
|
||||
font-family: inherit;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.flatpickr-current-month input.cur-year:focus {
|
||||
@ -427,11 +434,7 @@
|
||||
box-sizing: border-box;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
font-weight: 300;
|
||||
height: auto;
|
||||
line-height: inherit;
|
||||
margin: -1px 0 0 0;
|
||||
outline: none;
|
||||
padding: 0 0 0 0.5ch;
|
||||
@ -441,6 +444,12 @@
|
||||
-webkit-appearance: menulist;
|
||||
-moz-appearance: menulist;
|
||||
width: auto;
|
||||
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
line-height: 16px;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
|
||||
.flatpickr-current-month .flatpickr-monthDropdown-months:focus,
|
||||
@ -459,6 +468,7 @@
|
||||
}
|
||||
|
||||
.flatpickr-weekdays {
|
||||
margin-top: 20px;
|
||||
background: transparent;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
@ -490,15 +500,17 @@ span.flatpickr-weekday {
|
||||
background: #E7EFFF;
|
||||
text-transform: uppercase;
|
||||
color: #00133B;
|
||||
line-height: 1;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
-webkit-box-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
span.flatpickr-weekday {
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.dayContainer,
|
||||
@ -507,6 +519,7 @@ span.flatpickr-weekday {
|
||||
}
|
||||
|
||||
.flatpickr-days {
|
||||
margin-top: 10px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
display: -webkit-box;
|
||||
@ -595,7 +608,6 @@ span.flatpickr-weekday {
|
||||
cursor: pointer;
|
||||
outline: 0;
|
||||
background: #0952E6;
|
||||
border-color: #0952E6;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
@ -712,7 +724,6 @@ span.flatpickr-weekday {
|
||||
.flatpickr-weekwrapper .flatpickr-weekday {
|
||||
float: none;
|
||||
width: 100%;
|
||||
line-height: 28px;
|
||||
}
|
||||
|
||||
.flatpickr-weekwrapper span.flatpickr-day,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user