diff options
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | src/TimePicker.jsx | 4 |
2 files changed, 4 insertions, 1 deletions
@@ -71,6 +71,7 @@ API | |||
71 | | addon | Function | nothing | called from timepicker panel to render some addon to its bottom, like an OK button. Receives panel instance as parameter, to be able to close it like `panel.close()`.| | 71 | | addon | Function | nothing | called from timepicker panel to render some addon to its bottom, like an OK button. Receives panel instance as parameter, to be able to close it like `panel.close()`.| |
72 | | placement | String | bottomLeft | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] | | 72 | | placement | String | bottomLeft | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'] | |
73 | | transitionName | String | '' | | | 73 | | transitionName | String | '' | | |
74 | | name | String | nothing | sets the name of the generated input | | ||
74 | 75 | ||
75 | 76 | ||
76 | ## Test Case | 77 | ## Test Case |
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index ec3eda0..e6c2031 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() { |
@@ -187,7 +188,7 @@ const Picker = React.createClass({ | |||
187 | const { | 188 | const { |
188 | prefixCls, placeholder, placement, align, | 189 | prefixCls, placeholder, placement, align, |
189 | disabled, transitionName, style, className, showHour, | 190 | disabled, transitionName, style, className, showHour, |
190 | showMinute, showSecond, getPopupContainer, | 191 | showMinute, showSecond, getPopupContainer, name, |
191 | } = this.props; | 192 | } = this.props; |
192 | const { open, value } = this.state; | 193 | const { open, value } = this.state; |
193 | let popupClassName; | 194 | let popupClassName; |
@@ -213,6 +214,7 @@ const Picker = React.createClass({ | |||
213 | <input | 214 | <input |
214 | className={`${prefixCls}-input`} | 215 | className={`${prefixCls}-input`} |
215 | ref="picker" type="text" placeholder={placeholder} | 216 | ref="picker" type="text" placeholder={placeholder} |
217 | name={name} | ||
216 | readOnly | 218 | readOnly |
217 | onKeyDown={this.onKeyDown} | 219 | onKeyDown={this.onKeyDown} |
218 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} | 220 | disabled={disabled} value={value && value.format(this.getFormat()) || ''} |