diff options
author | MG12 <wuzhao.mail@gmail.com> | 2015-11-19 08:37:41 +0800 |
---|---|---|
committer | MG12 <wuzhao.mail@gmail.com> | 2015-11-19 08:37:41 +0800 |
commit | 63541ed7b1c9ad58348ea86c97f3e8b31830535b (patch) | |
tree | bfa03255ff614ca97210a7df7e2bb8ee7f3f74d4 /src/module | |
parent | 6c6cb0fbfc159cff7ebd1c7ef9d7f5a547e57e61 (diff) | |
download | time-picker-63541ed7b1c9ad58348ea86c97f3e8b31830535b.tar.gz time-picker-63541ed7b1c9ad58348ea86c97f3e8b31830535b.tar.zst time-picker-63541ed7b1c9ad58348ea86c97f3e8b31830535b.zip |
Diffstat (limited to 'src/module')
-rw-r--r-- | src/module/Panel.jsx | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/module/Panel.jsx b/src/module/Panel.jsx index 4220da8..f041158 100644 --- a/src/module/Panel.jsx +++ b/src/module/Panel.jsx | |||
@@ -72,20 +72,6 @@ const Panel = React.createClass({ | |||
72 | this.props.onClear(); | 72 | this.props.onClear(); |
73 | }, | 73 | }, |
74 | 74 | ||
75 | getPlaceholder(placeholder) { | ||
76 | if (placeholder) { | ||
77 | return placeholder; | ||
78 | } | ||
79 | |||
80 | const { locale } = this.props; | ||
81 | if (!this.showHour) { | ||
82 | return locale.placeholdermmss; | ||
83 | } else if (!this.showSecond) { | ||
84 | return locale.placeholderHHmm; | ||
85 | } | ||
86 | return locale.placeholderHHmmss; | ||
87 | }, | ||
88 | |||
89 | showHour: true, | 75 | showHour: true, |
90 | showSecond: true, | 76 | showSecond: true, |
91 | 77 | ||
@@ -102,7 +88,7 @@ const Panel = React.createClass({ | |||
102 | locale={locale} | 88 | locale={locale} |
103 | value={value} | 89 | value={value} |
104 | formatter={this.getFormatter()} | 90 | formatter={this.getFormatter()} |
105 | placeholder={this.getPlaceholder(placeholder)} | 91 | placeholder={placeholder} |
106 | hourOptions={hourOptions} | 92 | hourOptions={hourOptions} |
107 | minuteOptions={minuteOptions} | 93 | minuteOptions={minuteOptions} |
108 | secondOptions={secondOptions} | 94 | secondOptions={secondOptions} |