fix: should not cache formatter, close #1509

This commit is contained in:
Benjy Cui 2016-04-27 11:15:20 +08:00
parent 055619a896
commit 22e35544b6

View File

@ -47,17 +47,9 @@ export default function wrapPicker(Picker, defaultFormat) {
}
getFormatter = () => {
if (!this.formats) {
this.formats = {};
}
const formats = this.formats;
const format = this.props.format;
if (formats[format]) {
return formats[format];
}
formats[format] = new DateTimeFormat(format, this.getLocale().lang.format);
return formats[format];
const formatter = new DateTimeFormat(format, this.getLocale().lang.format);
return formatter;
}
parseDateFromValue = (value) => {