diff options
author | afc163 <afc163@gmail.com> | 2015-12-08 16:42:27 +0800 |
---|---|---|
committer | afc163 <afc163@gmail.com> | 2015-12-08 16:42:27 +0800 |
commit | 96d366afb6e5b4821c87af25cfbfbc8a4eccc2d7 (patch) | |
tree | 25744c761025c2bdf835dfa64039967fa2359c40 /src/TimePicker.jsx | |
parent | d360614938e1f73d1a564ca5c1d243e58ec6c187 (diff) | |
download | time-picker-96d366afb6e5b4821c87af25cfbfbc8a4eccc2d7.tar.gz time-picker-96d366afb6e5b4821c87af25cfbfbc8a4eccc2d7.tar.zst time-picker-96d366afb6e5b4821c87af25cfbfbc8a4eccc2d7.zip |
Add className prop1.0.0-alpha3
Diffstat (limited to 'src/TimePicker.jsx')
-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 |