Skip to content

Commit

Permalink
Merge pull request #24 from AddJam/master
Browse files Browse the repository at this point in the history
Allow disabled style to be overridden
  • Loading branch information
feyy authored Aug 2, 2016
2 parents 068beeb + f486dd4 commit 170537c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,11 @@ class DatePicker extends Component {
render() {
let customStyles = this.props.customStyles;
this.format = this.props.format || FORMATS[this.props.mode];
const dateInputStyle = [
Style.dateInput, customStyles.dateInput,
this.state.disabled && Style.disabled,
this.state.disabled && customStyles.disabled
]

return (
<TouchableHighlight
Expand All @@ -205,7 +210,7 @@ class DatePicker extends Component {
onPress={this.onPressDate}
>
<View style={[Style.dateTouchBody, customStyles.dateTouchBody]}>
<View style={[Style.dateInput, customStyles.dateInput, this.state.disabled && Style.disabled]}>
<View style={dateInputStyle}>
{this.getTitleElement()}
</View>
{this.props.showIcon && <Image
Expand Down

0 comments on commit 170537c

Please sign in to comment.