diff options
author | 偏右 <afc163@gmail.com> | 2017-02-20 16:02:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-20 16:02:11 +0800 |
commit | 66c7bc36856bbabb4ff73a3ccf671448eed1f359 (patch) | |
tree | d06f2e3b8e267c242863d10bb983352440ca00b7 /src | |
parent | fa912931fa6952cf85fe4b35bd15cd83f3e32876 (diff) | |
parent | ee6394229b2340c70c342851ecf5dba3462ac4ef (diff) | |
download | time-picker-66c7bc36856bbabb4ff73a3ccf671448eed1f359.tar.gz time-picker-66c7bc36856bbabb4ff73a3ccf671448eed1f359.tar.zst time-picker-66c7bc36856bbabb4ff73a3ccf671448eed1f359.zip |
Merge branch 'master' into fix-ref-error
Diffstat (limited to 'src')
-rw-r--r-- | src/TimePicker.jsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index 28857a0..da47ac4 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx | |||
@@ -41,6 +41,7 @@ const Picker = React.createClass({ | |||
41 | onOpen: PropTypes.func, | 41 | onOpen: PropTypes.func, |
42 | onClose: PropTypes.func, | 42 | onClose: PropTypes.func, |
43 | addon: PropTypes.func, | 43 | addon: PropTypes.func, |
44 | name: PropTypes.string, | ||
44 | }, | 45 | }, |
45 | 46 | ||
46 | getDefaultProps() { | 47 | getDefaultProps() { |
@@ -188,7 +189,7 @@ const Picker = React.createClass({ | |||
188 | const { | 189 | const { |
189 | prefixCls, placeholder, placement, align, | 190 | prefixCls, placeholder, placement, align, |
190 | disabled, transitionName, style, className, showHour, | 191 | disabled, transitionName, style, className, showHour, |
191 | showMinute, showSecond, getPopupContainer, | 192 | showMinute, showSecond, getPopupContainer, name, |
192 | } = this.props; | 193 | } = this.props; |
193 | const { open, value } = this.state; | 194 | const { open, value } = this.state; |
194 | let popupClassName; | 195 | let popupClassName; |
@@ -213,7 +214,10 @@ const Picker = React.createClass({ | |||
213 | <span className={`${prefixCls} ${className}`} style={style}> | 214 | <span className={`${prefixCls} ${className}`} style={style}> |
214 | <input | 215 | <input |
215 | className={`${prefixCls}-input`} | 216 | className={`${prefixCls}-input`} |
216 | ref={this.saveInputRef} type="text" placeholder={placeholder} | 217 | ref={this.saveInputRef} |
218 | type="text" | ||
219 | placeholder={placeholder} | ||
220 | name={name} | ||
217 | readOnly | 221 | readOnly |
218 | onKeyDown={this.onKeyDown} | 222 | onKeyDown={this.onKeyDown} |
219 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} | 223 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} |