Skip to content

Commit 197cad6

Browse files
committed
fix: MonthPicker value can not change when open #1510
1 parent 1b78a10 commit 197cad6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

components/vc-calendar/src/calendar/CalendarHeader.jsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function showIf(condition, el) {
2222
}
2323

2424
const CalendarHeader = {
25+
name: 'CalendarHeader',
2526
mixins: [BaseMixin],
2627
props: {
2728
prefixCls: PropTypes.string,
@@ -149,7 +150,7 @@ const CalendarHeader = {
149150
panel = (
150151
<MonthPanel
151152
locale={locale}
152-
defaultValue={value}
153+
value={value}
153154
rootPrefixCls={prefixCls}
154155
onSelect={this.onMonthSelect}
155156
onYearPanelShow={() => this.showYearPanel('month')}

components/vc-calendar/src/month/MonthPanel.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ function goYear(direction) {
1212
function noop() {}
1313

1414
const MonthPanel = {
15+
name: 'MonthPanel',
1516
mixins: [BaseMixin],
1617
props: {
1718
value: PropTypes.any,

0 commit comments

Comments
 (0)