Skip to content

Commit bfe0b41

Browse files
committed
fix: ios width
1 parent dd7d7b3 commit bfe0b41

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

ios/RNDateTimePicker.m

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

75+
- (CGSize)intrinsicContentSize {
76+
CGSize size = [super intrinsicContentSize];
77+
// iOS DatePicker requires a minimum width of 280 points for proper display
78+
// See: https://github.com/react-native-datetimepicker/datetimepicker/issues/1014
79+
size.width = MAX(size.width, 280);
80+
return size;
81+
}
82+
7583
@end

0 commit comments

Comments
 (0)