henninghall / react-native-date-picker

React Native Date Picker is datetime picker for Android and iOS. It includes date, time and datetime picker modes. The datepicker is customizable and is supporting different languages. It's written with native code to achieve the best possible look, feel and performance.
MIT License
2.21k stars 338 forks source link

props buttonColor is not working for Android #799

Closed rohitnegi0017 closed 5 months ago

rohitnegi0017 commented 5 months ago

Describe the bug buttonColor is not working for Android

Expected behavior It should change the color for cancel and confirm button.

import React, { useState } from 'react' import { Button } from 'react-native' import DatePicker from 'react-native-date-picker'

export default () => { const [date, setDate] = useState(new Date()) const [open, setOpen] = useState(false)

return ( <> <Button title="Open" onPress={() => setOpen(true)} /> <DatePicker modal open={open} date={date} onConfirm={(date) => { setOpen(false) setDate(date) }} onCancel={() => { setOpen(false) }} buttonColor={'#dd00ff'} /> </> ) }

Smartphone (please complete the following information):

henninghall commented 5 months ago

Thanks for reporting this, it is fixed in version 5.0.2

L-Chew commented 1 month ago

@henninghall Doesn't seem like buttonColor is a prop of react-native-date-picker anymore. How should we go about changing the confirm/cancel text colors?

henninghall commented 1 month ago

It is still a prop, if it doesn't work as intended, please explain the outcome!

L-Chew commented 1 month ago

All good now - realized I was using a prior version that didn't include buttonColor prop.