mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 11:39:28 +08:00
fix: should not cache formatter, close #1509
This commit is contained in:
parent
055619a896
commit
22e35544b6
@ -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) => {
|
||||
|
Loading…
Reference in New Issue
Block a user