aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--examples/pick-time.js1
-rw-r--r--examples/value-and-defaultValue.js2
-rw-r--r--package.json2
-rw-r--r--src/TimePicker.jsx6
4 files changed, 7 insertions, 4 deletions
diff --git a/examples/pick-time.js b/examples/pick-time.js
index a8c5415..dd5a2ce 100644
--- a/examples/pick-time.js
+++ b/examples/pick-time.js
@@ -28,6 +28,7 @@ ReactDom.render(
28 <TimePicker formatter={formatter} locale={TimePickerLocale} 28 <TimePicker formatter={formatter} locale={TimePickerLocale}
29 showSecond={showSecond} 29 showSecond={showSecond}
30 defaultValue={now} 30 defaultValue={now}
31 className="xxx"
31 onChange={onChange}/>, 32 onChange={onChange}/>,
32 document.getElementById('__react-content') 33 document.getElementById('__react-content')
33); 34);
diff --git a/examples/value-and-defaultValue.js b/examples/value-and-defaultValue.js
index 67771c0..404c963 100644
--- a/examples/value-and-defaultValue.js
+++ b/examples/value-and-defaultValue.js
@@ -37,7 +37,7 @@ const App = React.createClass({
37 onChange={this.handleValueChange}/> 37 onChange={this.handleValueChange}/>
38 </div> 38 </div>
39 ); 39 );
40 } 40 },
41}); 41});
42 42
43ReactDom.render( 43ReactDom.render(
diff --git a/package.json b/package.json
index dae39aa..cb988ab 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
1{ 1{
2 "name": "rc-time-picker", 2 "name": "rc-time-picker",
3 "version": "1.0.0-alpha2", 3 "version": "1.0.0-alpha3",
4 "description": "React TimePicker", 4 "description": "React TimePicker",
5 "keywords": [ 5 "keywords": [
6 "react", 6 "react",
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