From 96d366afb6e5b4821c87af25cfbfbc8a4eccc2d7 Mon Sep 17 00:00:00 2001 From: afc163 Date: Tue, 8 Dec 2015 16:42:27 +0800 Subject: [PATCH] Add className prop --- examples/pick-time.js | 1 + examples/value-and-defaultValue.js | 2 +- package.json | 2 +- src/TimePicker.jsx | 6 ++++-- 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( , document.getElementById('__react-content') ); 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({ onChange={this.handleValueChange}/> ); - } + }, }); ReactDom.render( diff --git a/package.json b/package.json index dae39aa..cb988ab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-time-picker", - "version": "1.0.0-alpha2", + "version": "1.0.0-alpha3", "description": "React TimePicker", "keywords": [ "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({ formatter: PropTypes.any, showHour: PropTypes.bool, style: PropTypes.object, + className: PropTypes.string, showSecond: PropTypes.bool, hourOptions: PropTypes.array, minuteOptions: PropTypes.array, @@ -47,6 +48,7 @@ const Picker = React.createClass({ return { defaultOpen: false, style: {}, + className: '', gregorianCalendarLocale: defaultGregorianCalendarLocale, align: {}, allowEmpty: true, @@ -193,7 +195,7 @@ const Picker = React.createClass({ }, render() { - const { prefixCls, placeholder, placement, align, disabled, transitionName, style, showHour, showSecond, getPopupContainer } = this.props; + const { prefixCls, placeholder, placement, align, disabled, transitionName, style, className, showHour, showSecond, getPopupContainer } = this.props; const { open, value } = this.state; let popupClassName; if (!showHour || !showSecond) { @@ -214,7 +216,7 @@ const Picker = React.createClass({ popupVisible={open} onPopupVisibleChange={this.onVisibleChange} > - +