iOS has wrapper around the picker when setting background colour

Đang mở
#1,001 2 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ios, javascript, react-native
Lĩnh vực
frontend, mobile

Hướng nghiên cứu

Start by reading the iOS implementation of the compact DateTimePicker and the package’s styling documentation; the issue gives no source file or failing test to start from. Reproduce the reported background color with the provided component props and compare how the picker renders for different date lengths. Done means the picker background appears consistent without light side areas across those date lengths.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

When adding a background colour to the DateTimePicker, it is almost as if the picker itself is a separate element. I would have expected the DateTimePicker's background to be the same colour throughout, not have light parts on the sides that make it seem like there's a wrapper view around it. This also differs on the length of the input date. Any ideas on how to fix? See screenshots and code below

Image Image
<DateTimePicker
    style={SharedStyles.datePicker}
    display={Platform.OS === 'android' ? 'calendar' : 'compact'}
    textColor='#002A32'
    accentColor='#002A32'
    themeVariant="light"
    testID="dateTimePicker"
    value={date}
    mode={'date'}
    maximumDate={currentDate}
    onChange={setPickedDate}
/>

// Style
datePicker: {
    borderRadius: 10,
    backgroundColor: '#FFCF70',
    color: '#002A32',
},

// In package.json
"@react-native-community/datetimepicker": "^8.4.1",
Ngôn ngữ chính
JavaScript
Star
2.9k
Fork
459
Merge trung bình
4 ngày 16 giờ
Pull request đã merge (30 ngày)
5

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của react-native-datetimepicker/datetimepicker

Tất cả issue của react-native-datetimepicker/datetimepicker

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.