From 37c36c09e0a4d693a2ec5623ff2ebc8d9ee16a06 Mon Sep 17 00:00:00 2001
From: afc163 <afc163@gmail.com>
Date: Fri, 11 Nov 2016 13:55:55 +0800
Subject: Add showMinute

---
 src/Combobox.jsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'src/Combobox.jsx')

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({
     value: PropTypes.object,
     onChange: PropTypes.func,
     showHour: PropTypes.bool,
+    showMinute: PropTypes.bool,
     showSecond: PropTypes.bool,
     hourOptions: PropTypes.array,
     minuteOptions: PropTypes.array,
@@ -73,7 +74,10 @@ const Combobox = React.createClass({
   },
 
   getMinuteSelect(minute) {
-    const { prefixCls, minuteOptions, disabledMinutes, defaultOpenValue } = this.props;
+    const { prefixCls, minuteOptions, disabledMinutes, defaultOpenValue, showMinute } = this.props;
+    if (!showMinute) {
+      return null;
+    }
     const value = this.props.value || defaultOpenValue;
     const disabledOptions = disabledMinutes(value.hour());
 
-- 
cgit v1.2.3

