2021-09-18 00:07:10 +08:00
|
|
|
$calendar-icon: '<svg xmlns="http://www.w3.org/2000/svg" width="14px" height="16px" viewBox="0 0 448 512"><path d="M400 64h-48V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H160V12c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v52H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zm-6 400H54c-3.3 0-6-2.7-6-6V160h352v298c0 3.3-2.7 6-6 6z"></path></svg>';
|
|
|
|
|
2019-07-18 23:29:41 +08:00
|
|
|
.d-date-input {
|
2020-04-23 04:17:53 +08:00
|
|
|
display: inline-flex;
|
2020-03-31 04:02:24 +08:00
|
|
|
cursor: pointer;
|
|
|
|
flex-direction: column;
|
2020-04-23 04:17:53 +08:00
|
|
|
min-width: 140px;
|
2021-09-09 23:01:56 +08:00
|
|
|
flex: 1 0 auto;
|
2020-03-27 20:29:58 +08:00
|
|
|
|
2019-07-18 23:29:41 +08:00
|
|
|
.date-picker {
|
2020-03-31 04:02:24 +08:00
|
|
|
cursor: pointer;
|
2019-07-18 23:29:41 +08:00
|
|
|
margin: 0;
|
|
|
|
text-align: left;
|
|
|
|
width: 100%;
|
2021-09-18 00:07:10 +08:00
|
|
|
box-shadow: none;
|
|
|
|
position: relative;
|
2020-04-23 04:17:53 +08:00
|
|
|
|
2021-09-18 00:07:10 +08:00
|
|
|
&::-webkit-input-placeholder,
|
|
|
|
&::-ms-input-placeholder,
|
2020-04-23 04:17:53 +08:00
|
|
|
&::placeholder {
|
2021-09-18 00:07:10 +08:00
|
|
|
font-size: var(--font-0);
|
2020-08-04 10:57:10 +08:00
|
|
|
color: var(--primary-medium);
|
2020-04-23 04:17:53 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
2021-02-04 00:45:54 +08:00
|
|
|
@include default-focus;
|
2020-04-23 04:17:53 +08:00
|
|
|
}
|
2019-07-18 23:29:41 +08:00
|
|
|
|
2021-09-11 03:13:45 +08:00
|
|
|
// iOS doesn't display the placeholder attribute for date inputs
|
2021-09-18 00:07:10 +08:00
|
|
|
html.ios-device &:after {
|
2021-09-11 03:13:45 +08:00
|
|
|
font-size: var(--font-0);
|
|
|
|
color: var(--primary-medium);
|
|
|
|
content: attr(placeholder);
|
|
|
|
}
|
2021-09-18 00:07:10 +08:00
|
|
|
|
|
|
|
// use custom icon and fix issues across browsers
|
|
|
|
// - Safari does not use an icon
|
|
|
|
// - default Chrome/IE icon too tall, makes input height inconsistent
|
|
|
|
// - default Chrome/IE icon are black on dark themes
|
|
|
|
// - allows themes to style as needed
|
|
|
|
// Note that this does nothing in Firefox
|
|
|
|
html:not(.ios-device) & {
|
|
|
|
&::after {
|
|
|
|
content: "";
|
|
|
|
-webkit-mask: svg-uri($calendar-icon) no-repeat 50% 50%;
|
|
|
|
mask: svg-uri($calendar-icon) no-repeat 50% 50%;
|
|
|
|
position: absolute;
|
|
|
|
right: 4px;
|
|
|
|
top: 0px;
|
|
|
|
box-sizing: border-box;
|
|
|
|
background-color: var(--primary);
|
|
|
|
height: 100%;
|
|
|
|
width: 20px;
|
|
|
|
z-index: 1;
|
|
|
|
}
|
|
|
|
&::-webkit-calendar-picker-indicator {
|
|
|
|
background: transparent;
|
|
|
|
position: absolute;
|
|
|
|
cursor: pointer;
|
|
|
|
right: 0px;
|
|
|
|
z-index: 2;
|
|
|
|
}
|
|
|
|
}
|
2021-09-11 03:13:45 +08:00
|
|
|
}
|
2021-09-18 00:07:10 +08:00
|
|
|
|
2019-07-18 23:29:41 +08:00
|
|
|
.pika-single {
|
|
|
|
margin-left: -1px;
|
2020-04-23 04:17:53 +08:00
|
|
|
margin-top: 1px;
|
|
|
|
|
|
|
|
.pika-row td {
|
|
|
|
.pika-button.pika-day {
|
|
|
|
box-shadow: none;
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
2019-07-18 23:29:41 +08:00
|
|
|
}
|
|
|
|
}
|
2020-04-23 04:17:53 +08:00
|
|
|
|
|
|
|
.d-date-input + .d-time-input {
|
|
|
|
margin-left: 1px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-time-input + .d-date-input {
|
|
|
|
margin-left: 1px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.d-date-input + .clear-date-time {
|
|
|
|
margin-left: 1px;
|
|
|
|
}
|