Skip to content

Commit 6c5e516

Browse files
authored
fix(ui5-datetime-picker): Adapt components with responsive paddings (#4977)
Related to: #4869
1 parent 26aff35 commit 6c5e516

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

packages/main/src/DateTimePicker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ class DateTimePicker extends DatePicker {
234234
"ui5-dt-cal--hidden": this.phone && this.showTimeView,
235235
"ui5-dt-time--hidden": this.phone && this.showDateView,
236236
},
237+
footer: {
238+
"ui5-dt-picker-footer-time-hidden": (this.phone && this.showTimeView) || (this.phone && this.showDateView),
239+
},
237240
};
238241
}
239242

packages/main/src/DateTimePickerPopover.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
{{/inline}}
5454

5555
{{#*inline "footer"}}
56-
<div slot="footer" class="ui5-dt-picker-footer">
56+
<div slot="footer" class="ui5-dt-picker-footer {{classes.footer}}">
5757
<ui5-button
5858
id="ok"
5959
class="ui5-dt-picker-action"

packages/main/src/themes/Calendar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
box-sizing: border-box;
88
height: var(--_ui5_calendar_height);
99
width: var(--_ui5_calendar_width);
10-
margin: var(--_ui5_calendar_top_bottom_padding) var(--_ui5_calendar_left_right_padding) 0;
10+
padding: var(--_ui5_calendar_top_bottom_padding) var(--_ui5_calendar_left_right_padding) 0;
1111
display: flex;
1212
flex-direction: column-reverse;
1313
justify-content: flex-end;

packages/main/src/themes/DateTimePickerPopover.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
.ui5-dt-cal {
1515
width: auto;
16-
padding: 0.5rem 0.25rem 0 0.25rem; /* both cozy and compact */
1716
box-sizing: border-box;
1817
}
1918

@@ -54,6 +53,11 @@
5453
padding: 0 0.5rem 0 0.25rem;
5554
}
5655

56+
57+
.ui5-dt-picker-footer.ui5-dt-picker-footer-time-hidden {
58+
padding: 0;
59+
}
60+
5761
.ui5-dt-picker-action {
5862
margin: 0.25rem;
5963
}

0 commit comments

Comments
 (0)