aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/TimePicker.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/TimePicker.jsx')
-rw-r--r--src/TimePicker.jsx12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx
index 2c6a1f1..271515d 100644
--- a/src/TimePicker.jsx
+++ b/src/TimePicker.jsx
@@ -42,10 +42,13 @@ export default class Picker extends Component {
42 onChange: PropTypes.func, 42 onChange: PropTypes.func,
43 onOpen: PropTypes.func, 43 onOpen: PropTypes.func,
44 onClose: PropTypes.func, 44 onClose: PropTypes.func,
45 onFocus: PropTypes.func,
46 onBlur: PropTypes.func,
45 addon: PropTypes.func, 47 addon: PropTypes.func,
46 name: PropTypes.string, 48 name: PropTypes.string,
47 autoComplete: PropTypes.string, 49 autoComplete: PropTypes.string,
48 use12Hours: PropTypes.bool, 50 use12Hours: PropTypes.bool,
51 onKeyDown: PropTypes.func,
49 }; 52 };
50 53
51 static defaultProps = { 54 static defaultProps = {
@@ -69,8 +72,11 @@ export default class Picker extends Component {
69 onChange: noop, 72 onChange: noop,
70 onOpen: noop, 73 onOpen: noop,
71 onClose: noop, 74 onClose: noop,
75 onFocus: noop,
76 onBlur: noop,
72 addon: noop, 77 addon: noop,
73 use12Hours: false, 78 use12Hours: false,
79 onKeyDown: noop,
74 }; 80 };
75 81
76 constructor(props) { 82 constructor(props) {
@@ -157,7 +163,7 @@ export default class Picker extends Component {
157 prefixCls, placeholder, disabledHours, 163 prefixCls, placeholder, disabledHours,
158 disabledMinutes, disabledSeconds, hideDisabledOptions, 164 disabledMinutes, disabledSeconds, hideDisabledOptions,
159 allowEmpty, showHour, showMinute, showSecond, defaultOpenValue, clearText, 165 allowEmpty, showHour, showMinute, showSecond, defaultOpenValue, clearText,
160 addon, use12Hours, 166 addon, use12Hours, onKeyDown,
161 } = this.props; 167 } = this.props;
162 return ( 168 return (
163 <Panel 169 <Panel
@@ -181,6 +187,7 @@ export default class Picker extends Component {
181 hideDisabledOptions={hideDisabledOptions} 187 hideDisabledOptions={hideDisabledOptions}
182 use12Hours={use12Hours} 188 use12Hours={use12Hours}
183 addon={addon} 189 addon={addon}
190 onKeyDown={onKeyDown}
184 /> 191 />
185 ); 192 );
186 } 193 }
@@ -231,6 +238,7 @@ export default class Picker extends Component {
231 const { 238 const {
232 prefixCls, placeholder, placement, align, 239 prefixCls, placeholder, placement, align,
233 disabled, transitionName, style, className, getPopupContainer, name, autoComplete, 240 disabled, transitionName, style, className, getPopupContainer, name, autoComplete,
241 onFocus, onBlur,
234 } = this.props; 242 } = this.props;
235 const { open, value } = this.state; 243 const { open, value } = this.state;
236 const popupClassName = this.getPopupClassName(); 244 const popupClassName = this.getPopupClassName();
@@ -260,6 +268,8 @@ export default class Picker extends Component {
260 onKeyDown={this.onKeyDown} 268 onKeyDown={this.onKeyDown}
261 disabled={disabled} value={value && value.format(this.getFormat()) || ''} 269 disabled={disabled} value={value && value.format(this.getFormat()) || ''}
262 autoComplete={autoComplete} 270 autoComplete={autoComplete}
271 onFocus={onFocus}
272 onBlur={onBlur}
263 /> 273 />
264 <span className={`${prefixCls}-icon`}/> 274 <span className={`${prefixCls}-icon`}/>
265 </span> 275 </span>