diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/TimePicker.jsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx index 2694cb0..2354db8 100644 --- a/src/TimePicker.jsx +++ b/src/TimePicker.jsx | |||
@@ -32,6 +32,7 @@ const Picker = React.createClass({ | |||
32 | formatter: PropTypes.any, | 32 | formatter: PropTypes.any, |
33 | showHour: PropTypes.bool, | 33 | showHour: PropTypes.bool, |
34 | style: PropTypes.object, | 34 | style: PropTypes.object, |
35 | className: PropTypes.string, | ||
35 | showSecond: PropTypes.bool, | 36 | showSecond: PropTypes.bool, |
36 | hourOptions: PropTypes.array, | 37 | hourOptions: PropTypes.array, |
37 | minuteOptions: PropTypes.array, | 38 | minuteOptions: PropTypes.array, |
@@ -47,6 +48,7 @@ const Picker = React.createClass({ | |||
47 | return { | 48 | return { |
48 | defaultOpen: false, | 49 | defaultOpen: false, |
49 | style: {}, | 50 | style: {}, |
51 | className: '', | ||
50 | gregorianCalendarLocale: defaultGregorianCalendarLocale, | 52 | gregorianCalendarLocale: defaultGregorianCalendarLocale, |
51 | align: {}, | 53 | align: {}, |
52 | allowEmpty: true, | 54 | allowEmpty: true, |
@@ -193,7 +195,7 @@ const Picker = React.createClass({ | |||
193 | }, | 195 | }, |
194 | 196 | ||
195 | render() { | 197 | render() { |
196 | const { prefixCls, placeholder, placement, align, disabled, transitionName, style, showHour, showSecond, getPopupContainer } = this.props; | 198 | const { prefixCls, placeholder, placement, align, disabled, transitionName, style, className, showHour, showSecond, getPopupContainer } = this.props; |
197 | const { open, value } = this.state; | 199 | const { open, value } = this.state; |
198 | let popupClassName; | 200 | let popupClassName; |
199 | if (!showHour || !showSecond) { | 201 | if (!showHour || !showSecond) { |
@@ -214,7 +216,7 @@ const Picker = React.createClass({ | |||
214 | popupVisible={open} | 216 | popupVisible={open} |
215 | onPopupVisibleChange={this.onVisibleChange} | 217 | onPopupVisibleChange={this.onVisibleChange} |
216 | > | 218 | > |
217 | <span className={`${prefixCls}`} style={style}> | 219 | <span className={`${prefixCls} ${className}`} style={style}> |
218 | <input className={`${prefixCls}-input`} | 220 | <input className={`${prefixCls}-input`} |
219 | ref="picker" type="text" placeholder={placeholder} | 221 | ref="picker" type="text" placeholder={placeholder} |
220 | readOnly | 222 | readOnly |