Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

props buttonColor is not working for Android #799

Closed
rohitnegi0017 opened this issue Apr 17, 2024 · 4 comments · Fixed by #804
Closed

props buttonColor is not working for Android #799

rohitnegi0017 opened this issue Apr 17, 2024 · 4 comments · Fixed by #804

Comments

@rohitnegi0017
Copy link

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):

  • OS: [Android]
  • React Native version [e.g. 0.68.5]
  • react-native-date-picker version [5.0.1]
@henninghall
Copy link
Owner

Thanks for reporting this, it is fixed in version 5.0.2

@L-Chew
Copy link

L-Chew commented Aug 23, 2024

@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
Copy link
Owner

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

@L-Chew
Copy link

L-Chew commented Aug 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants