]> git.immae.eu Git - github/fretlink/time-picker.git/blobdiff - src/mixin/CommonMixin.js
select input value range when enter different select panel
[github/fretlink/time-picker.git] / src / mixin / CommonMixin.js
index 0e8ed32e84037454a6a165e40a75ada56976addd..a6893b84adfc63e55a6010806d7ac411148b5247 100644 (file)
@@ -1,6 +1,5 @@
 import {PropTypes} from 'react';
 import enUs from '../locale/en_US';
-import {getFormatter} from '../util/index';
 
 export default {
   propTypes: {
@@ -14,33 +13,4 @@ export default {
       locale: enUs,
     };
   },
-
-  getFormatter() {
-    const formatter = this.props.formatter;
-    const locale = this.props.locale;
-    if (formatter) {
-      if (formatter === this.lastFormatter) {
-        return this.normalFormatter;
-      }
-      this.normalFormatter = getFormatter(formatter, locale);
-      this.lastFormatter = formatter;
-      return this.normalFormatter;
-    }
-    if (!this.showSecond) {
-      if (!this.notShowSecondFormatter) {
-        this.notShowSecondFormatter = getFormatter('HH:mm', locale);
-      }
-      return this.notShowSecondFormatter;
-    }
-    if (!this.showHour) {
-      if (!this.notShowHourFormatter) {
-        this.notShowHourFormatter = getFormatter('mm:ss', locale);
-      }
-      return this.notShowHourFormatter;
-    }
-    if (!this.normalFormatter) {
-      this.normalFormatter = getFormatter('HH:mm:ss', locale);
-    }
-    return this.normalFormatter;
-  },
 };