Skip to content

Commit

Permalink
BB-18875: No calendar button in date fields on tablet and phone views…
Browse files Browse the repository at this point in the history
… in view switcher on MacOS Safari (#34061)
  • Loading branch information
lexxcode authored Nov 2, 2022
1 parent 6925e24 commit b578dc9
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,17 @@
display: $datepicker-input-display;
max-width: $datepicker-input-max-width;
padding-left: $datepicker-input-padding-left;
position: $datepicker-input-position;

&::-webkit-calendar-picker-indicator {
width: $datepicker-input-padding-left;
height: auto;
position: absolute;
top: 0;
left: 0;
right: auto;
bottom: 0;
}
}

&--form-mode {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
display: none;
}

&[type='date'],
&[type='time'] {
display: flex;
align-items: center;
}

&[type='date'] {
min-height: $input-date-height;

Expand All @@ -31,21 +37,23 @@
}

&::-webkit-calendar-picker-indicator {
display: none;
opacity: 0;
}

// Fix height Shadow DOM elements
// Fix height and text-align Shadow DOM elements
&::-webkit-date-and-time-value,
&::-webkit-datetime-edit {
line-height: 1;
text-align: left;
}
}

&[type='time'] {
// Fix height Shadow DOM elements
// Fix height and text-align Shadow DOM elements
&::-webkit-date-and-time-value,
&::-webkit-datetime-edit {
line-height: 1;
text-align: left;
}
}

Expand Down Expand Up @@ -117,6 +125,7 @@
&::before {
content: attr(placeholder);
color: $input-time-placeholder-color;
text-align: left;
flex: 1 1 0%;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ $datepicker-box-icon-pointer-events: none !default;
$datepicker-input-display: block !default;
$datepicker-input-max-width: 140px !default;
$datepicker-input-padding-left: 39px !default;
$datepicker-input-position: relative !default;

$datepicker-input-form-mode-icon-top: 35px !default;
$datepicker-box-form-mode-datepicker-input-max-width: none !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
&::-webkit-search-cancel-button,
&::-webkit-search-results-button,
&::-webkit-search-results-decoration,
// Disable platform styles of "date" input
&::-webkit-calendar-picker-indicator,
// Disable platform styles of "time" input
&::-webkit-inner-spin-button {
display: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
$content: '#{$icon}';
}

&:#{$state} {
&::#{$state} {
content: $content;
font-family: $fa-font-family, $font-family-sans-serif;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$content: '#{$icon}';
}

&:#{$state} {
&::#{$state} {
content: $content;
font-family: $icon-font;

Expand Down

0 comments on commit b578dc9

Please sign in to comment.