File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -153,15 +153,17 @@ export default class DateTimePicker extends PureComponent {
153
153
showLeadingZeros = { this . props . showLeadingZeros }
154
154
value = { this . props . value }
155
155
/>
156
- < button
157
- className = "react-datetime-picker__clear-button react-datetime-picker__button__icon"
158
- disabled = { disabled }
159
- onClick = { this . clear }
160
- onFocus = { this . stopPropagation }
161
- type = "button"
162
- >
163
- { this . props . clearIcon }
164
- </ button >
156
+ { this . props . clearIcon !== null && (
157
+ < button
158
+ className = "react-datetime-picker__clear-button react-datetime-picker__button__icon"
159
+ disabled = { disabled }
160
+ onClick = { this . clear }
161
+ onFocus = { this . stopPropagation }
162
+ type = "button"
163
+ >
164
+ { this . props . clearIcon }
165
+ </ button >
166
+ ) }
165
167
< button
166
168
className = "react-datetime-picker__calendar-button react-datetime-picker__button__icon"
167
169
disabled = { disabled }
You can’t perform that action at this time.
0 commit comments