Confirm and cancel buttons
See original GitHub issueIssue
Hello, Thanks for the great library but I have a problem with the latest React Native version. The text of the confirm and cancel buttons is not displayed.
Expected Behavior
Text should be displayed in buttons.
Code
import React, { Component } from 'react'
import { View } from 'react-native'
import DatePicker from 'react-native-datepicker'
export default class MyDatePicker extends Component {
constructor(props){
super(props)
this.state = {date:"2016-05-15"}
}
render(){
return (
<View style={{marginTop: 100}}>
<DatePicker
style={{width: 200}}
date={this.state.date}
mode="date"
placeholder="select date"
format="YYYY-MM-DD"
minDate="2016-05-01"
maxDate="2016-06-01"
confirmBtnText="Confirm"
cancelBtnText="Cancel"
customStyles={{
dateIcon: {
position: 'absolute',
left: 0,
top: 4,
marginLeft: 0
},
dateInput: {
marginLeft: 36
}
// ... You can check the source to find the other keys.
}}
onDateChange={(date) => {this.setState({date: date})}}
/>
</View>
)
}
}
Environment
react-native -v
: “0.54.2”node -v
: v9.8.0npm -v
: 5.6.0yarn --version
: 1.5.1target platform
: iOSoperating system
: OSX
Issue Analytics
- State:
- Created 6 years ago
- Reactions:15
- Comments:7
Top Results From Across the Web
OK/Cancel on left/right? - User Experience Stack Exchange
So Cancel is always on the right of OK button. For MacOS. A button that initiates an action is furthest to the right....
Read more >OK-Cancel or Cancel-OK? The Trouble With Buttons
OK-Cancel or Cancel-OK? The Trouble With Buttons. Summary: Should the OK button come before or after the Cancel button? Following platform ...
Read more >Primary & Secondary Action Buttons | by Nick Babich | UX Planet
'OK'/'Cancel' button debate is very popular among designers: “Should the primary action button come before or after the secondary action button?
Read more >Return confirm cancel button not working - Stack Overflow
the onlick confirm cancel button doesn't cancel the action but just keeps going. Somebody knows what's wrong with this return confirm ?
Read more >“Ok-Key” and “Cancel-Key”, Which One Should Be Set Up on ...
“Ok-key” and “cancel-key”, which one should be set up on the left? It's an eternal war of button sort between UI designers preferring...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I figured out a workaround for this using the current build, although it should be updated in the library. Using Toggle Inspector in the debug tools you will see there is just no height for the text of the TouchableHighlight buttons. You can actually click on them. Because the library allows customStyles, I added the following to the CustomStyles property after the dateInput object when creating a <DatePicker> component…
@jeffbonasso you are a hero