Skip to content

Commit a262e95

Browse files
committed
Fixed Date+Time Picker UI Glitches.
1 parent 395cd73 commit a262e95

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Sources/MaterialUIKit/Components/Form Controls/MUIDatePicker.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ private struct MUIDatePickerView: View {
8585
.padding(15)
8686
.shadow(color: .black.opacity(0.1), radius: 10, x: 0, y: 1)
8787
}
88+
.frame(width: UIScreen.main.bounds.width)
8889
// In Animation
8990
.scaleEffect(animationFlag ? 1 : 0)
9091
.opacity(animationFlag ? 1 : 0)
@@ -165,7 +166,7 @@ extension MUIDatePickerView {
165166

166167
dismissDatePicker()
167168
}
168-
.frame(width: UIScreen.main.bounds.height)
169+
.frame(width: UIScreen.main.bounds.height, height: UIScreen.main.bounds.height / 1.2)
169170
}
170171
}
171172

Sources/MaterialUIKit/Components/Form Controls/MUITimePicker.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ private struct MUITimePickerView: View {
8585
.padding(15)
8686
.shadow(color: .black.opacity(0.1), radius: 10, x: 0, y: 1)
8787
}
88+
.frame(width: UIScreen.main.bounds.width)
8889
// In Animation
8990
.scaleEffect(animationFlag ? 1 : 0)
9091
.opacity(animationFlag ? 1 : 0)
@@ -165,6 +166,6 @@ extension MUITimePickerView {
165166

166167
dismissDatePicker()
167168
}
168-
.frame(width: UIScreen.main.bounds.height)
169+
.frame(width: UIScreen.main.bounds.height, height: UIScreen.main.bounds.height / 1.2)
169170
}
170171
}

0 commit comments

Comments
 (0)