diff options
Diffstat (limited to 'src/Combobox.jsx')
-rw-r--r-- | src/Combobox.jsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Combobox.jsx b/src/Combobox.jsx index 9d9da16..013617c 100644 --- a/src/Combobox.jsx +++ b/src/Combobox.jsx | |||
@@ -26,6 +26,7 @@ const Combobox = React.createClass({ | |||
26 | value: PropTypes.object, | 26 | value: PropTypes.object, |
27 | onChange: PropTypes.func, | 27 | onChange: PropTypes.func, |
28 | showHour: PropTypes.bool, | 28 | showHour: PropTypes.bool, |
29 | showMinute: PropTypes.bool, | ||
29 | showSecond: PropTypes.bool, | 30 | showSecond: PropTypes.bool, |
30 | hourOptions: PropTypes.array, | 31 | hourOptions: PropTypes.array, |
31 | minuteOptions: PropTypes.array, | 32 | minuteOptions: PropTypes.array, |
@@ -73,7 +74,10 @@ const Combobox = React.createClass({ | |||
73 | }, | 74 | }, |
74 | 75 | ||
75 | getMinuteSelect(minute) { | 76 | getMinuteSelect(minute) { |
76 | const { prefixCls, minuteOptions, disabledMinutes, defaultOpenValue } = this.props; | 77 | const { prefixCls, minuteOptions, disabledMinutes, defaultOpenValue, showMinute } = this.props; |
78 | if (!showMinute) { | ||
79 | return null; | ||
80 | } | ||
77 | const value = this.props.value || defaultOpenValue; | 81 | const value = this.props.value || defaultOpenValue; |
78 | const disabledOptions = disabledMinutes(value.hour()); | 82 | const disabledOptions = disabledMinutes(value.hour()); |
79 | 83 | ||