Skip to content

Commit 705bdd2

Browse files
committed
fix: ios width
1 parent 9a2c578 commit 705bdd2

File tree

1 file changed

+0
-42
lines changed

1 file changed

+0
-42
lines changed

ios/RNDateTimePicker.m

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -72,48 +72,6 @@ - (void)setDate:(NSDate *)date {
7272
}
7373
}
7474

75-
- (void)setFrame:(CGRect)frame {
76-
// Enforce minimum dimensions to prevent UIKit warnings
77-
// UIDatePicker requires minimum 280pt width
78-
CGRect adjustedFrame = frame;
79-
80-
if (adjustedFrame.size.width > 0 && adjustedFrame.size.width < 280) {
81-
adjustedFrame.size.width = 280;
82-
}
83-
84-
// UICalendarView (inline style) requires minimum 330pt height
85-
if (@available(iOS 14.0, *)) {
86-
if (self.preferredDatePickerStyle == UIDatePickerStyleInline) {
87-
if (adjustedFrame.size.height > 0 && adjustedFrame.size.height < 330) {
88-
adjustedFrame.size.height = 330;
89-
}
90-
}
91-
}
92-
93-
[super setFrame:adjustedFrame];
94-
}
95-
96-
- (void)setBounds:(CGRect)bounds {
97-
// Enforce minimum dimensions to prevent UIKit warnings
98-
// UIDatePicker requires minimum 280pt width
99-
CGRect adjustedBounds = bounds;
100-
101-
if (adjustedBounds.size.width > 0 && adjustedBounds.size.width < 280) {
102-
adjustedBounds.size.width = 280;
103-
}
104-
105-
// UICalendarView (inline style) requires minimum 330pt height
106-
if (@available(iOS 14.0, *)) {
107-
if (self.preferredDatePickerStyle == UIDatePickerStyleInline) {
108-
if (adjustedBounds.size.height > 0 && adjustedBounds.size.height < 330) {
109-
adjustedBounds.size.height = 330;
110-
}
111-
}
112-
}
113-
114-
[super setBounds:adjustedBounds];
115-
}
116-
11775
- (CGSize)intrinsicContentSize {
11876
CGSize size = [super intrinsicContentSize];
11977

0 commit comments

Comments
 (0)