diff options
author | afc163 <afc163@gmail.com> | 2016-11-11 13:55:55 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2016-11-11 13:55:55 +0800 |
commit | 37c36c09e0a4d693a2ec5623ff2ebc8d9ee16a06 (patch) | |
tree | 81fc9b6ec28ca54204cf6ed2ef035b5d7ee194ab /src/Combobox.jsx | |
parent | 3b3350d5d710a7caf14926dfcce3684d3df3aff8 (diff) | |
download | time-picker-37c36c09e0a4d693a2ec5623ff2ebc8d9ee16a06.tar.gz time-picker-37c36c09e0a4d693a2ec5623ff2ebc8d9ee16a06.tar.zst time-picker-37c36c09e0a4d693a2ec5623ff2ebc8d9ee16a06.zip |
Add showMinute
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 | ||