From aed96fd625c23d720f0f4a684c1fcd62b7399be7 Mon Sep 17 00:00:00 2001
From: MG12 <wuzhao.mail@gmail.com>
Date: Wed, 16 Dec 2015 16:45:08 +0800
Subject: fixed bugs when value empty.

---
 src/module/Combobox.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/module/Combobox.jsx')

diff --git a/src/module/Combobox.jsx b/src/module/Combobox.jsx
index 7374b39..f1e7c5b 100644
--- a/src/module/Combobox.jsx
+++ b/src/module/Combobox.jsx
@@ -79,7 +79,8 @@ const Combobox = React.createClass({
   },
 
   getMinuteSelect(minute) {
-    const { prefixCls, minuteOptions, disabledMinutes, value } = this.props;
+    const { prefixCls, minuteOptions, disabledMinutes } = this.props;
+    const value = this.props.value || this.getNow();
     const disabledOptions = disabledMinutes(value.getHourOfDay());
 
     return (
@@ -95,10 +96,11 @@ const Combobox = React.createClass({
   },
 
   getSecondSelect(second) {
-    const { prefixCls, secondOptions, disabledSeconds, showSecond, value } = this.props;
+    const { prefixCls, secondOptions, disabledSeconds, showSecond } = this.props;
     if (!showSecond) {
       return null;
     }
+    const value = this.props.value || this.getNow();
     const disabledOptions = disabledSeconds(value.getHourOfDay(), value.getMinutes());
 
     return (
-- 
cgit v1.2.3

