From 6d1ad104daefa7bc09dfdffd521541abf38dc6bc Mon Sep 17 00:00:00 2001
From: Andreas Fehn <andi.fehn@gmail.com>
Date: Sat, 4 Feb 2017 08:10:23 +0100
Subject: Add prop for naming the input

---
 src/TimePicker.jsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'src/TimePicker.jsx')

diff --git a/src/TimePicker.jsx b/src/TimePicker.jsx
index ec3eda0..e6c2031 100644
--- a/src/TimePicker.jsx
+++ b/src/TimePicker.jsx
@@ -41,6 +41,7 @@ const Picker = React.createClass({
     onOpen: PropTypes.func,
     onClose: PropTypes.func,
     addon: PropTypes.func,
+    name: PropTypes.string,
   },
 
   getDefaultProps() {
@@ -187,7 +188,7 @@ const Picker = React.createClass({
     const {
       prefixCls, placeholder, placement, align,
       disabled, transitionName, style, className, showHour,
-      showMinute, showSecond, getPopupContainer,
+      showMinute, showSecond, getPopupContainer, name,
     } = this.props;
     const { open, value } = this.state;
     let popupClassName;
@@ -213,6 +214,7 @@ const Picker = React.createClass({
           <input
             className={`${prefixCls}-input`}
             ref="picker" type="text" placeholder={placeholder}
+            name={name}
             readOnly
             onKeyDown={this.onKeyDown}
             disabled={disabled} value={value && value.format(this.getFormat()) || ''}
-- 
cgit v1.2.3

