diff --git a/index.js b/index.js
index 74341a6a11..f10d12accb 100644
--- a/index.js
+++ b/index.js
@@ -257,6 +257,29 @@ class DatePicker extends Component {
this.props.onOpenModal();
}
}
+
+ _renderIcon() {
+ const {
+ showIcon,
+ iconSource,
+ iconComponent,
+ customStyles
+ } = this.props;
+
+ if (showIcon) {
+ if (!!iconComponent) {
+ return iconComponent;
+ }
+ return (
+
+ );
+ }
+
+ return null;
+ }
render() {
const {
@@ -290,10 +313,7 @@ class DatePicker extends Component {
{this.getTitleElement()}
- {showIcon && }
+ {this._renderIcon()}
{Platform.OS === 'ios' &&