]> git.immae.eu Git - github/fretlink/time-picker.git/blobdiff - src/module/Panel.jsx
clear input content and close select panel when click [x] on select panel
[github/fretlink/time-picker.git] / src / module / Panel.jsx
index 4220da86f72a232749f9e9eb56f2dc430748f9dd..f04115823a9a914fe878847034fd07125ba14f54 100644 (file)
@@ -72,20 +72,6 @@ const Panel = React.createClass({
     this.props.onClear();
   },
 
-  getPlaceholder(placeholder) {
-    if (placeholder) {
-      return placeholder;
-    }
-
-    const { locale } = this.props;
-    if (!this.showHour) {
-      return locale.placeholdermmss;
-    } else if (!this.showSecond) {
-      return locale.placeholderHHmm;
-    }
-    return locale.placeholderHHmmss;
-  },
-
   showHour: true,
   showSecond: true,
 
@@ -102,7 +88,7 @@ const Panel = React.createClass({
           locale={locale}
           value={value}
           formatter={this.getFormatter()}
-          placeholder={this.getPlaceholder(placeholder)}
+          placeholder={placeholder}
           hourOptions={hourOptions}
           minuteOptions={minuteOptions}
           secondOptions={secondOptions}