From 1882f74dd69a626f6f0592d94801c6968c038751 Mon Sep 17 00:00:00 2001
From: yiminghe <yiminghe@gmail.com>
Date: Thu, 31 Mar 2016 17:36:34 +0800
Subject: fix 0.15 warning

---
 src/TimePicker.jsx | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

(limited to 'src/TimePicker.jsx')

diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx
index f9b9207..350eeb2 100644
--- a/src/TimePicker.jsx
+++ b/src/TimePicker.jsx
@@ -1,9 +1,9 @@
-import React, {PropTypes} from 'react';
+import React, { PropTypes } from 'react';
 import Trigger from 'rc-trigger';
 import Panel from './module/Panel';
 import placements from './util/placements';
 import CommonMixin from './mixin/CommonMixin';
-import {getFormatter} from './util/index';
+import { getFormatter } from './util/index';
 
 function noop() {
 }
@@ -80,7 +80,7 @@ const Picker = React.createClass({
       });
     }
     if (open !== undefined) {
-      this.setState({open});
+      this.setState({ open });
     }
   },
 
@@ -147,8 +147,11 @@ const Picker = React.createClass({
   },
 
   getPanelElement() {
-    const { prefixCls, defaultValue, locale, placeholder, disabledHours,
-      disabledMinutes, disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showSecond } = this.props;
+    const {
+      prefixCls, defaultValue, locale, placeholder, disabledHours,
+      disabledMinutes, disabledSeconds, hideDisabledOptions,
+      allowEmpty, showHour, showSecond,
+    } = this.props;
     return (
       <Panel
         prefixCls={`${prefixCls}-panel`}
@@ -174,7 +177,7 @@ const Picker = React.createClass({
   },
 
   setOpen(open, callback) {
-    const {onOpen, onClose} = this.props;
+    const { onOpen, onClose } = this.props;
     if (this.state.open !== open) {
       this.setState({
         open,
@@ -213,11 +216,13 @@ const Picker = React.createClass({
         onPopupVisibleChange={this.onVisibleChange}
       >
         <span className={`${prefixCls} ${className}`} style={style}>
-          <input className={`${prefixCls}-input`}
-                 ref="picker" type="text" placeholder={placeholder}
-                 readOnly
-                 onKeyDown={this.onKeyDown}
-                 disabled={disabled} value={value && this.getFormatter().format(value)}/>
+          <input
+            className={`${prefixCls}-input`}
+            ref="picker" type="text" placeholder={placeholder}
+            readOnly
+            onKeyDown={this.onKeyDown}
+            disabled={disabled} value={value && this.getFormatter().format(value) || ''}
+          />
           <span className={`${prefixCls}-icon`}/>
         </span>
       </Trigger>
-- 
cgit v1.2.3

