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