Skip to content

Feature request: More color customization #50

@iankberry

Description

@iankberry

This library provides many options to customize the picker colors, but there are a few areas that are inconsistent/missing between the platforms.

On iOS the containerColor (background) and most of the contentColor (text) style properties appear to have no effect.

On Android there doesn't appear to be any way to customize the yearmonth colors and it doesn't respect the color scheme like iOS, so the text is unreadable in dark mode. Ideally it would follow the colors from the styles prop though as we have our own text/accent colors.

Thanks for your consideration!

Style object:

const datePickerColors = useMemo((): Styles => ({
        accentColor: theme.color.green,
        containerColor: theme.background.primary,
        currentYearContentColor: theme.color.green,
        dayContentColor: theme.text.primary,
        dayInSelectionRangeContentColor: theme.text.tertiary,
        navigationContentColor: theme.text.primary,
        periodSelectorSelectedContainerColor: theme.color.green,
        selectedDayContainerColor: theme.color.green,
        selectedDayContentColor: theme.colorScheme === 'light' ? theme.color.white : theme.color.black,
        selectedYearContainerColor: theme.color.green,
        selectedYearContentColor: theme.colorScheme === 'light' ? theme.color.white : theme.color.black,
        subheadContentColor: theme.text.primary,
        titleContentColor: theme.text.primary,
        todayContentColor: theme.color.green,
        todayDateBorderColor: theme.color.green,
        weekdayContentColor: theme.text.tertiary,
        yearContentColor: theme.text.secondary,
    }), [ theme.colorScheme ]);

Screenshots showing the differences between the two platforms in dark mode:

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions