Closed rohitnegi0017 closed 5 months ago
Thanks for reporting this, it is fixed in version 5.0.2
@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?
It is still a prop, if it doesn't work as intended, please explain the outcome!
All good now - realized I was using a prior version that didn't include buttonColor prop.
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):