aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Panel.jsx
diff options
context:
space:
mode:
authorshoaibbhimani <shoaibbhimani1392@gmail.com>2017-08-24 16:41:19 +0530
committershoaibbhimani <shoaibbhimani1392@gmail.com>2017-08-24 16:41:19 +0530
commit0e4fd1626e460bd52a82de3f12f84d88f652dd7e (patch)
tree3cf72e1fa9efb52f0bb6486d962b2a6d70ff2447 /src/Panel.jsx
parent227e6ec28c733bba0a4b56e0583058489c0684a6 (diff)
downloadtime-picker-0e4fd1626e460bd52a82de3f12f84d88f652dd7e.tar.gz
time-picker-0e4fd1626e460bd52a82de3f12f84d88f652dd7e.tar.zst
time-picker-0e4fd1626e460bd52a82de3f12f84d88f652dd7e.zip
Add keydown function on header input
Diffstat (limited to 'src/Panel.jsx')
-rw-r--r--src/Panel.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Panel.jsx b/src/Panel.jsx
index 1953ad4..8a6c872 100644
--- a/src/Panel.jsx
+++ b/src/Panel.jsx
@@ -40,6 +40,7 @@ class Panel extends Component {
40 onClear: PropTypes.func, 40 onClear: PropTypes.func,
41 use12Hours: PropTypes.bool, 41 use12Hours: PropTypes.bool,
42 addon: PropTypes.func, 42 addon: PropTypes.func,
43 onKeyDown: PropTypes.func,
43 }; 44 };
44 45
45 static defaultProps = { 46 static defaultProps = {
@@ -52,6 +53,7 @@ class Panel extends Component {
52 defaultOpenValue: moment(), 53 defaultOpenValue: moment(),
53 use12Hours: false, 54 use12Hours: false,
54 addon: noop, 55 addon: noop,
56 onKeyDown: noop,
55 }; 57 };
56 58
57 constructor(props) { 59 constructor(props) {
@@ -89,7 +91,7 @@ class Panel extends Component {
89 const { 91 const {
90 prefixCls, className, placeholder, disabledHours, disabledMinutes, 92 prefixCls, className, placeholder, disabledHours, disabledMinutes,
91 disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond, 93 disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond,
92 format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, 94 format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, onKeyDown,
93 } = this.props; 95 } = this.props;
94 const { 96 const {
95 value, currentSelectPanel, 97 value, currentSelectPanel,
@@ -122,6 +124,7 @@ class Panel extends Component {
122 onChange={this.onChange} 124 onChange={this.onChange}
123 onClear={onClear} 125 onClear={onClear}
124 allowEmpty={allowEmpty} 126 allowEmpty={allowEmpty}
127 onKeyDown={onKeyDown}
125 /> 128 />
126 <Combobox 129 <Combobox
127 prefixCls={prefixCls} 130 prefixCls={prefixCls}