Skip to content

iOS has wrapper around the picker when setting background colour #1001

@devesmee

Description

@devesmee

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: Colour.buttonBackground,
    color: Colour.inversedText,
},

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions