From 8133e8cf3b37b2be764616493ade7c7a7678fce1 Mon Sep 17 00:00:00 2001 From: yiminghe Date: Fri, 27 Nov 2015 16:15:05 +0800 Subject: add gregorianCalendarLocale prop --- src/mixin/CommonMixin.js | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'src/mixin') diff --git a/src/mixin/CommonMixin.js b/src/mixin/CommonMixin.js index 0e8ed32..a6893b8 100644 --- a/src/mixin/CommonMixin.js +++ b/src/mixin/CommonMixin.js @@ -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; - }, }; -- cgit v1.2.3