mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 22:36:31 +08:00
parent
2c5366603c
commit
fb2e355f14
@ -240,11 +240,23 @@ export default class Calendar extends React.Component<CalendarProps, CalendarSta
|
||||
);
|
||||
}
|
||||
|
||||
getDefaultLocale = () => {
|
||||
const result = {
|
||||
...enUS,
|
||||
...this.props.locale,
|
||||
};
|
||||
result.lang = {
|
||||
...result.lang,
|
||||
...(this.props.locale || {}).lang,
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<LocaleReceiver
|
||||
componentName="Calendar"
|
||||
defaultLocale={enUS}
|
||||
defaultLocale={this.getDefaultLocale}
|
||||
>
|
||||
{this.renderCalendar}
|
||||
</LocaleReceiver>
|
||||
|
Loading…
Reference in New Issue
Block a user