diff options
author | Aleksandr Denisenko <aleksandr.denisenko.it@gmail.com> | 2017-11-17 11:55:18 +0200 |
---|---|---|
committer | Aleksandr Denisenko <aleksandr.denisenko.it@gmail.com> | 2017-11-17 12:04:35 +0200 |
commit | d907505b9f219f4ef2885166846251c7e0c65de9 (patch) | |
tree | 820176c342616b10f4be28210a2cdd2dd3779242 /src/Panel.jsx | |
parent | a60ac4d8d3b9f527c10e5185265f322468781c81 (diff) | |
download | time-picker-d907505b9f219f4ef2885166846251c7e0c65de9.tar.gz time-picker-d907505b9f219f4ef2885166846251c7e0c65de9.tar.zst time-picker-d907505b9f219f4ef2885166846251c7e0c65de9.zip |
make header input readonly by an optional prop
Diffstat (limited to 'src/Panel.jsx')
-rw-r--r-- | src/Panel.jsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Panel.jsx b/src/Panel.jsx index a1b7c77..c23241d 100644 --- a/src/Panel.jsx +++ b/src/Panel.jsx | |||
@@ -27,6 +27,7 @@ class Panel extends Component { | |||
27 | value: PropTypes.object, | 27 | value: PropTypes.object, |
28 | placeholder: PropTypes.string, | 28 | placeholder: PropTypes.string, |
29 | format: PropTypes.string, | 29 | format: PropTypes.string, |
30 | readOnlyInput: PropTypes.bool, | ||
30 | disabledHours: PropTypes.func, | 31 | disabledHours: PropTypes.func, |
31 | disabledMinutes: PropTypes.func, | 32 | disabledMinutes: PropTypes.func, |
32 | disabledSeconds: PropTypes.func, | 33 | disabledSeconds: PropTypes.func, |
@@ -58,6 +59,7 @@ class Panel extends Component { | |||
58 | use12Hours: false, | 59 | use12Hours: false, |
59 | addon: noop, | 60 | addon: noop, |
60 | onKeyDown: noop, | 61 | onKeyDown: noop, |
62 | readOnlyInput: false, | ||
61 | }; | 63 | }; |
62 | 64 | ||
63 | constructor(props) { | 65 | constructor(props) { |
@@ -96,7 +98,7 @@ class Panel extends Component { | |||
96 | prefixCls, className, placeholder, disabledHours, disabledMinutes, | 98 | prefixCls, className, placeholder, disabledHours, disabledMinutes, |
97 | disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond, | 99 | disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond, |
98 | format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, | 100 | format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear, |
99 | focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep, | 101 | focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep, readOnlyInput, |
100 | } = this.props; | 102 | } = this.props; |
101 | const { | 103 | const { |
102 | value, currentSelectPanel, | 104 | value, currentSelectPanel, |
@@ -137,6 +139,7 @@ class Panel extends Component { | |||
137 | allowEmpty={allowEmpty} | 139 | allowEmpty={allowEmpty} |
138 | focusOnOpen={focusOnOpen} | 140 | focusOnOpen={focusOnOpen} |
139 | onKeyDown={onKeyDown} | 141 | onKeyDown={onKeyDown} |
142 | readOnlyInput={readOnlyInput} | ||
140 | /> | 143 | /> |
141 | <Combobox | 144 | <Combobox |
142 | prefixCls={prefixCls} | 145 | prefixCls={prefixCls} |