]> git.immae.eu Git - github/fretlink/time-picker.git/blobdiff - src/Panel.jsx
make header input readonly by an optional prop
[github/fretlink/time-picker.git] / src / Panel.jsx
index a1b7c77a9cdd1ae19f28b892e2bc979141dc23f1..c23241d0a7cec953015523d7bf207849f7706e7e 100644 (file)
@@ -27,6 +27,7 @@ class Panel extends Component {
     value: PropTypes.object,
     placeholder: PropTypes.string,
     format: PropTypes.string,
+    readOnlyInput: PropTypes.bool,
     disabledHours: PropTypes.func,
     disabledMinutes: PropTypes.func,
     disabledSeconds: PropTypes.func,
@@ -58,6 +59,7 @@ class Panel extends Component {
     use12Hours: false,
     addon: noop,
     onKeyDown: noop,
+    readOnlyInput: false,
   };
 
   constructor(props) {
@@ -96,7 +98,7 @@ class Panel extends Component {
       prefixCls, className, placeholder, disabledHours, disabledMinutes,
       disabledSeconds, hideDisabledOptions, allowEmpty, showHour, showMinute, showSecond,
       format, defaultOpenValue, clearText, onEsc, addon, use12Hours, onClear,
-      focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep,
+      focusOnOpen, onKeyDown, hourStep, minuteStep, secondStep, readOnlyInput,
     } = this.props;
     const {
       value, currentSelectPanel,
@@ -137,6 +139,7 @@ class Panel extends Component {
           allowEmpty={allowEmpty}
           focusOnOpen={focusOnOpen}
           onKeyDown={onKeyDown}
+          readOnlyInput={readOnlyInput}
         />
         <Combobox
           prefixCls={prefixCls}