diff --git a/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap
index 75b231e364..d4148c549c 100644
--- a/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap
+++ b/components/calendar/__tests__/__snapshots__/demo-extend.test.ts.snap
@@ -3481,8 +3481,8 @@ exports[`renders ./components/calendar/demo/customize-header.md extend context c
/>
{
months.push(localeData.monthsShort(current));
}
- for (let index = start; index < end; index++) {
+ for (let i = start; i < end; i++) {
monthOptions.push(
-
- {months[index]}
+
+ {months[i]}
,
);
}
- const month = value.month();
const year = value.year();
+ const month = value.month();
const options = [];
for (let i = year - 10; i < year + 10; i += 1) {
options.push(
@@ -83,11 +83,11 @@ const App: React.FC = () => {
size="small"
dropdownMatchSelectWidth={false}
className="my-year-select"
+ value={year}
onChange={newYear => {
- const now = value.clone().year(Number(newYear));
+ const now = value.clone().year(newYear);
onChange(now);
}}
- value={String(year)}
>
{options}
@@ -96,11 +96,10 @@ const App: React.FC = () => {